BitOrchestra.Parser.AcceptWhitespace C# (CSharp) Method

AcceptWhitespace() public static method

Tries parsing whitespace (tabs and spaces) in the given text.
public static AcceptWhitespace ( string Text, int &Index ) : bool
Text string
Index int
return bool
        public static bool AcceptWhitespace(string Text, ref int Index)
        {
            bool found = false;
            while (Index < Text.Length)
            {
                char c = Text[Index];
                if (c == ' ' || c == '\t')
                {
                    found = true;
                    Index++;
                    continue;
                }
                break;
            }
            return found;
        }