Example #1
0
        private static string GetSpecial(StringGetter r)
        {
            StringBuilder result = new StringBuilder();

            r.Mark(1);//Mark the present position in the stream
            int c = r.Read();

            while (IsLetter((char)c))
            {
                result.Append((char)c);
                r.Mark(1);
                c = r.Read();
            }

            if (c == ';')
            {
                result.Append(';');
            }
            else
            {
                r.Reset();
            }

            return(result.ToString());
        }
Example #2
0
        private static string GetSpecial(StringGetter r)
        {
            StringBuilder result = new StringBuilder();
            r.Mark(1);//Mark the present position in the stream
            int c = r.Read();

            while (IsLetter((char)c))
            {
                result.Append((char)c);
                r.Mark(1);
                c = r.Read();
            }

            if (c == ';')
            {
                result.Append(';');
            }
            else
            {
                r.Reset();
            }

            return result.ToString();
        }