Which is the method equivalent to Trim
de String
in Swift 2
, for example:
let string = " prueba ".trim()
// string == "prueba"
Which is the method equivalent to Trim
de String
in Swift 2
, for example:
let string = " prueba ".trim()
// string == "prueba"
You can use
stringByTrimmingCharactersInSet
this way:Here an example: