iOS开发 密码里面含有特殊字符如何处理传给后端

+ (NSString *)passWordToChange:(NSString *)string {
    NSString *pswStr = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, CFSTR("!*'\();:@&=+$,/?%#[]~`^-_|<>{}."), kCFStringEncodingUTF8));
    return pswStr;
}
posted @ 2018-01-23 15:27  tian_heng  阅读(207)  评论(0编辑  收藏  举报