我使用此函数从字符串中获取 URL,但我怎样才能将其取回?
- (NSString *)urlEncodeUsingEncoding:(NSStringEncoding)encoding forString:(NSString *)string {
string = (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (__bridge CFStringRef)string, NULL, (CFStringRef)@"!*'\"();:@&=+$,/?%#[]% ", CFStringConvertNSStringEncodingToEncoding(encoding));
return string;
}