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

InterpretEscapesInVerbatimString() public static method

This static method expands characters in a verbatim string, returning a modified string with character escapes replaced by the character which they denote.
public static InterpretEscapesInVerbatimString ( string source ) : string
source string
return string
        public static string InterpretEscapesInVerbatimString(string source)
        {
            int sLen = source.Length;
            if (sLen == 0)
                return source;
            char[] arr = new char[sLen];
            int sNxt = 0;
            int aNxt = 0;
            char chr = source[sNxt++];
            for (; ; chr = source[sNxt++])
            {
                if (chr != '\\')
                    arr[aNxt++] = chr;
                if (sNxt == sLen)
                    return new String(arr, 0, aNxt);
            }
        }