WikiFunctions.Tools.IsRomanNumber C# (CSharp) Method

IsRomanNumber() public static method

checks if given string represents a small Roman number
public static IsRomanNumber ( string s ) : bool
s string
return bool
        public static bool IsRomanNumber(string s)
        {
            if (string.IsNullOrEmpty(s) || s.Length > 9) return false;
            foreach (char c in s)
            {
                if (c != 'I' && c != 'V' && c != 'X' && c != 'L' && c != 'C') return false;
            }
            return true;
        }
Tools