Created
May 13, 2014 12:45
-
-
Save amieres/0ef3dcf02b4714183c1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String Input = null; | |
int LastPosition = -1; | |
int SpaceLength = 0; | |
void SkipSpacesComments() { | |
if (Position == LastPosition) return; | |
LastPosition = Position; | |
CurrentString = Input.Substring(Position); | |
string RegEx = "^([ \\t\\n\\r]|\\/\\*.*?\\*\\/)*"; | |
Match M = Regex.Match(CurrentString, RegEx); | |
SpaceLength = M.Length; | |
if (SpaceLength > 0) | |
CurrentString = CurrentString.Substring(SpaceLength); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment