forked from Noah37/zhuishushenqi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
caonongyun
authored and
caonongyun
committed
Jun 7, 2017
1 parent
876a9ee
commit 5c59095
Showing
78 changed files
with
4,360 additions
and
547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NSString+Encode.h | ||
// zhuishushenqi | ||
// | ||
// Created by caonongyun on 2017/4/26. | ||
// Copyright © 2017年 QS. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSString (Encode) | ||
|
||
- (NSString*)urlEncode; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// NSString+Encode.m | ||
// zhuishushenqi | ||
// | ||
// Created by caonongyun on 2017/4/26. | ||
// Copyright © 2017年 QS. All rights reserved. | ||
// | ||
|
||
#import "NSString+Encode.h" | ||
|
||
@implementation NSString (Encode) | ||
|
||
|
||
- (NSString*)urlEncode{ | ||
//different library use slightly different escaped and unescaped set. | ||
//below is copied from AFNetworking but still escaped [] as AF leave them for Rails array parameter which we don't use. | ||
//https://github.com/AFNetworking/AFNetworking/pull/555 | ||
NSString *result = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)self, CFSTR("."), CFSTR(":/?#[]@!$&'()*+,;="), kCFStringEncodingUTF8)); | ||
|
||
return result; | ||
} | ||
|
||
@end |
Oops, something went wrong.