close
從網頁中抓到的字串頭尾有很多的\r\n\t,該怎麼trim掉呢
NSString *trimmedString = [stockInfoString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
//這個只去掉頭尾的\t
//NSString *trimmedString = [stockInfoString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
來源:http://stackoverflow.com/questions/4683235/how-to-remove-remove-n-t-from-string-in-iphone
全站熱搜
留言列表