Adding new line to NSCharacterSet
<p>I want to strip a string of all new lines and commas (and place it into an array), so I created this:</p>

<pre><code>let results = text.componentsSeparatedByCharactersInSet(NSCharacterSet(charactersInString: ",\n"))
</code></pre>

<p>However, the newlines are still existing in my array (the commas are being removed). What's the correct way of adding newline to the NSCharacterSet? Or, how to add comma to NSCharacterSet.newLineCharacterSet.</p>

<p>Thanks.</p>

<p>Here is janky solution, but still looking for a more elegant one.</p>

<pre><code>var results = text.componentsSeparatedByCharactersInSet(NSCharacterSet(charactersInString: ","))
text = results.joinWithSeparator(" ")
results = text.componentsSeparatedByCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
</code></pre>

<p>(one-line) SOLUTION:</p>

<pre><code>var results = text.componentsSeparatedByCharactersInSet(NSCharacterSet(charactersInString: " ,\u{000A}\u{000B}\u{000C}\u{000D}\u{0085}"))
</code></pre>

<p>Explanation is below.</p>