I\'ve got a problem with removing whitespaces at the beginning and end of string. For e.g. I\'ve got a string like:
\\r\\n\\t- Someone will come here?\\n- I d
You can use this extension and just call "yourString".trim()
extension String { func trim() -> String { return self.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) } }