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; }