Udger.Parser.PerlRegExpConverter.CountUnicodeRange C# (CSharp) Method

CountUnicodeRange() private static method

Simple version of 'PosixRegExp.BracketExpression.CountRange' function. Generates string with all characters in specified range, but uses unicode encoding.
private static CountUnicodeRange ( char f, char t, string &range ) : bool
f char Lower bound
t char Upper bound
range string Returned string
return bool
        private static bool CountUnicodeRange(char f, char t, out string range)
        {
            range = "";
            if (f > t) return false;
            StringBuilder sb = new StringBuilder(t - f);
            for (char c = f; c <= t; c++) sb.Append(c);
            range = sb.ToString();
            return true;
        }