>>Mid() doesn't perform very well if you have a string at 20k. I have been looking since the last hour at an alternative using StringBuilder to achieve the same but was unable to find something valuable. Has anyone had to deal with long string when using Mid()?
>
>[I have not installed vs2010 on my new computer yet - so I cannot test]
>
>If you use a lot of mid() it will be slow. The reason is - I think - that each call creates another string (object)
>
>Can you use one char at a time ? If yes, why not index the string
>
>char c ;
>string s = "very long string";
>
>c = s[5];
>
If you are using the Mid() to continue the search for the next match, you can use IndexOf() and specify the startIndex
http://msdn.microsoft.com/en-us/library/aa904287(v=VS.71).aspx
Gregory