I am trying to change syntax "componentsSeparatedByCharactersInSet" to swift 3. But I does not work. How could it adapt to swift 3? This is my code in ios 9. It showed "Value of type 'String' has no member of 'componentsSeparatedByCharactersInSet'.
var delimiter = NSCharacterSet(charactersIn: ",")
func parseHeaders(fromLines lines: [String]) -> [String] {
return lines.componentsSeparatedByCharactersInSet(self.delimiter)
}