1
let str = " ---Hello---- " as NSString
str.stringByTrimmingCharactersInSet(NSCharacterSet(charactersInString:" -")) "Hello"
其中“ ”里面是空格+横杠