QUT.Gplex.Parser.CharacterUtilities.Canonicalize C# (CSharp) Method

Canonicalize() public static method

Take a possibly escaped character literal and convert it to a canonical form. Thus @"'\377'", @"'\xff'" and @"'\u00FF'" all return @"'\xFF'". Throws a StringInterpretException if character ordinal exceeds "symLimit".
public static Canonicalize ( string source, int startIndex ) : string
source string
startIndex int
return string
        public static string Canonicalize(string source, int startIndex)
        {
            char chr0 = source[startIndex++];
            if (chr0 != '\\')
                return String.Format(CultureInfo.InvariantCulture, "'{0}'", chr0);
            else
            {
                int codePoint = EscapedChar(source, ref startIndex);
                return QuoteMap(codePoint);
            }
        }