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

2018-01-23  本文已影响0人  tianheng
+ (NSString *)passWordToChange:(NSString *)string {
    NSString *pswStr = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, CFSTR("!*'\();:@&=+$,/?%#[]~`^-_|<>{}."), kCFStringEncodingUTF8));
    return pswStr;
}
上一篇下一篇

猜你喜欢

热点阅读