|
FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
|
NSString method shortcuts. More...
#import <NSString.h>
Instance Methods | |
Format | |
| (NSString *) | - format: |
| Returns a string made by using self as a format string template into which the argument values are substituted. More... | |
| (NSString *) | - format0: |
| Returns a string made by using self as a format string template into which the remaining argument values are substituted. More... | |
Range | |
| (NSRange) | - range |
| Returns range of string. More... | |
| (NSString *) | - substringFromIndex:length: |
| Returns a new string containing the characters of the receiver from the one at a given index with a given length. More... | |
| (NSString *) | - substringFromIndex:toIndex: |
| Returns a new string containing the characters of the receiver from the one at a given index to the other given index. More... | |
| (NSString *) | - stringByTrimmingWhitespaceCharacters |
| Returns a new string made by removing from both ends of the receiver characters contained in whitespace character set. More... | |
| (NSString *) | - stringByTrimmingWhitespaceAndNewlineCharacters |
| Returns a new string made by removing from both ends of the receiver characters contained in whitespace and newline character set. More... | |
| (NSString *) | - stringByTrimmingNewlineCharacters |
| Returns a new string made by removing from both ends of the receiver characters contained in newline character set. More... | |
NSString method shortcuts.
| - (NSString *) format0: | (nullable id) | dummyLikeNil | |
| , | ... | ||
Returns a string made by using self as a format string template into which the remaining argument values are substituted.
| dummyLikeNil | Do nothing. Value will be ignored. This is placeholder |
| ... | A comma-separated list of arguments to substitute into format. |
This ignores first argument. Pass anything.
| - (NSString *) format: | (id) | first | |
| , | ... | ||
Returns a string made by using self as a format string template into which the argument values are substituted.
| first,... | A comma-separated list of arguments to substitute into format. first should be id type. |
This requires first argument type to be id. To avoid this problems, use format0:.
| - (NSRange) range |
Returns range of string.
| - (NSString *) stringByTrimmingNewlineCharacters |
Returns a new string made by removing from both ends of the receiver characters contained in newline character set.
| - (NSString *) stringByTrimmingWhitespaceAndNewlineCharacters |
Returns a new string made by removing from both ends of the receiver characters contained in whitespace and newline character set.
| - (NSString *) stringByTrimmingWhitespaceCharacters |
Returns a new string made by removing from both ends of the receiver characters contained in whitespace character set.
| - (NSString *) substringFromIndex: | (NSUInteger) | from | |
| length: | (NSUInteger) | length | |
Returns a new string containing the characters of the receiver from the one at a given index with a given length.
| from | An index. The value must lie within the bounds of the receiver, or be equal to the length of the receiver. |
| length | A length. The summation of this value and from index must lie within the bounds of the receiver, or be equal to the length of the receiver. |
| - (NSString *) substringFromIndex: | (NSUInteger) | from | |
| toIndex: | (NSUInteger) | to | |
Returns a new string containing the characters of the receiver from the one at a given index to the other given index.
| from | An index. The value must lie within the bounds of the receiver, or be equal to the length of the receiver. |
| to | An index. The value must lie within the bounds of the receiver, or be equal to the length of the receiver. |