iOS開發 密碼裏面含有特殊字符如何處理傳給後端

+ (NSString *)passWordToChange:(NSString *)string {
    NSString *pswStr = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, CFSTR("!*'\();:@&=+$,/?%#[]~`^-_|<>{}."), kCFStringEncodingUTF8));
    return pswStr;
}
相關文章
相關標籤/搜索