FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSString(NSURL) Category Reference

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
 

Detailed Description

NSString shortcut to detect URL and to create an NSURL.

Method Documentation

- (NSURL *) __deprecated
- (BOOL) __deprecated
- (NSURL *) configurationURL

Returns a configuration URL from self value.

Returns
Result of ::configurationURLWithPath:
- (NSURL *) fileURL

Returns a file URL from self value.

Returns
Result of NSURL -fileURLWithPath:
- (BOOL) hasHTTPPrefix

Returns a Boolean value that indicates whether 'http://' or 'https://' matches the beginning characters of the receiver.

Returns
YES if 'http://' or 'https://' matches the beginning characters of the receiver, otherwise NO. Returns NO if aString is empty.
See also
hasPrefix:
- (BOOL) hasSmartURLPrefix

Returns a Boolean value that indicates whether 'http://', 'https://', 'res://' or 'conf://' matches the beginning characters of the receiver.

Returns
YES if 'http://', 'https://', 'res://' or 'conf://' matches the beginning characters of the receiver, otherwise NO. Returns NO if aString is empty.
See also
hasPrefix:
- (NSString *) pathProtocol
- (NSURL *) resourceURL

Returns a resource URL from self value.

Returns
Result of ::resourceURLWithPath:
- (NSURL *) smartURL

Returns a smart URL from self value.

Returns
Result of ::smartURLWithPath:
- (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.

See also
stringByAddingPercentEncodingWithAllowedCharacters:
- (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.

See also
stringByAddingPercentEncodingWithAllowedCharacters:
- (NSURL *) temporaryURL

Returns a temporary URL from self value.

Returns
Result of ::temporaryURLWithPath:
- (NSURL *) URL

Returns a URL from self value.

Returns
Result of NSURL -URLWithString:
- (NSString *) URLProtocol

Returns a String value that prefix matches "(^[a-zA-Z]*)://.*" or nil.


The documentation for this category was generated from the following file: