Hi,
I've a string that may or may not include C++ comments on it (multi-lin and single line) and I need to strip those comments out before being able to use that string. My current idea is to use an NSScanner to do that - find the position of opening and closing multi-line comments and delete that portion of the string and find the position of opening one line comments and EOL characters and also delete that portion of the string.
Would you do it differently? What would be your approach? If it matters, the string can be several megabytes in size so performance is an issue.