- (NSString *)keyValueStringWithDict:(NSDictionary *)dict
{
if (dict == nil) {
return nil;
}
NSMutableString *string = [NSMutableString stringWithString:@"?"];
[dict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
[string appendFormat:@"%@=%@&",key,obj];
}];
if ([string rangeOfString:@"&"].length) {
[string deleteCharactersInRange:NSMakeRange(string
ios 从URL中截取所包含的参数,并且以字典的形式返回和参数字典转URL
最新推荐文章于 2024-07-23 15:09:18 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)