FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
|
NSString shortcut to detect URL and to create an NSURL. More...
#import <NSURL.h>
Instance Methods | |
UTF8 shortcuts | |
(NSString *) | - stringByAddingPercentEncodingWithoutAllowedCharacters |
Returns a new string made from the receiver by replacing all characters with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. More... | |
(NSString *) | - stringByAddingPercentEncodingForURLQuery |
Returns a new string made from the receiver by replacing characters with percent encoded characters except for URL query characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. More... | |
URL prefix | |
(BOOL) | - hasHTTPPrefix |
Returns a Boolean value that indicates whether 'http://' or 'https://' matches the beginning characters of the receiver. More... | |
(BOOL) | - hasSmartURLPrefix |
Returns a Boolean value that indicates whether 'http://', 'https://', 'res://' or 'conf://' matches the beginning characters of the receiver. More... | |
(NSString *) | - URLProtocol |
Returns a String value that prefix matches "(^[a-zA-Z]*)://.*" or nil. More... | |
Creating an URL | |
(NSURL *) | - URL |
Returns a URL from self value. More... | |
(NSURL *) | - fileURL |
Returns a file URL from self value. More... | |
(NSURL *) | - resourceURL |
Returns a resource URL from self value. More... | |
(NSURL *) | - configurationURL |
Returns a configuration URL from self value. More... | |
(NSURL *) | - temporaryURL |
Returns a temporary URL from self value. More... | |
(NSURL *) | - smartURL |
Returns a smart URL from self value. More... | |
Deprecated | |
(NSURL *) | - __deprecated |
(BOOL) | - __deprecated |
(NSString *) | - pathProtocol |
NSString shortcut to detect URL and to create an NSURL.
- (NSURL *) __deprecated |
- (BOOL) __deprecated |
- (NSURL *) configurationURL |
Returns a configuration URL from self value.
- (NSURL *) fileURL |
Returns a file URL from self value.
- (BOOL) hasHTTPPrefix |
Returns a Boolean value that indicates whether 'http://' or 'https://' matches the beginning characters of the receiver.
- (BOOL) hasSmartURLPrefix |
Returns a Boolean value that indicates whether 'http://', 'https://', 'res://' or 'conf://' matches the beginning characters of the receiver.
- (NSString *) pathProtocol |
- (NSURL *) resourceURL |
Returns a resource URL from self value.
- (NSURL *) smartURL |
Returns a smart URL from self value.
- (NSString *) stringByAddingPercentEncodingForURLQuery |
Returns a new string made from the receiver by replacing characters with percent encoded characters except for URL query characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded.
- (NSString *) stringByAddingPercentEncodingWithoutAllowedCharacters |
Returns a new string made from the receiver by replacing all characters with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string.
- (NSURL *) temporaryURL |
Returns a temporary URL from self value.
- (NSURL *) URL |
Returns a URL from self value.
- (NSString *) URLProtocol |
Returns a String value that prefix matches "(^[a-zA-Z]*)://.*" or nil.