title: Best way to split a string into tokens skipping escaped delimiters?
body: <p>I'm receiving an <code>NSString</code> which uses commas as delimiters, and a backslash as an escape character. I was looking into splitting the string using <code>componentsSeparatedByString</code>, but I found no way to specify the escape character. Is there a built-in way to do this? NSScanner? CFStringTokenizer?</p>
  
  <p>If not, would it be better to split the string at the commas, and then rejoin tokens that were falsely split (after inspecting them for a (non-escaped) escape character at the end) or looping through each character trying to find a comma, and then looking back one character to see if the comma is escaped or not (and then one more character to see if the escape character is escaped).</p>
  
  <p>Now that I think about it, I would need to check that the amount of escape characters before a delimiter is even, because <strong>only then</strong> is the delimiter itself not being escaped.</p>
  
  <p>If someone has a method that does this, I'd appreciate it if I could take a look at it.</p>