去除NSString里面的空格

NSString *password = @"12  34";

[password stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];

原文地址:https://www.cnblogs.com/shidaying/p/4213571.html