Split with token info
- by boomhauer
I would like to split a string using multiple chars to split upon. For example, consider spin text format:
This is a {long|ugly|example} string
I would want to parse this string and split it on the "{", "|", and "}" chars
myString.Split('|','{','}')
Now I have tokens to play with, but what I would like is to retain the info about which char was used to split each piece of the array that is returned.
Any existing code that can do something like this?