public static AcceptNewline ( string Text, int &Index ) : bool | ||
Text | string | |
Index | int | |
return | bool |
public static bool AcceptNewline(string Text, ref int Index)
{
bool found = false;
while(Index < Text.Length)
{
char c = Text[Index];
switch (c)
{
case '\r':
case '\n':
found = true;
Index++;
continue;
default:
return found;
}
}
return found;
}