NSString(HTML) Category Reference
Declared in | NSString+HTML.h |
Instance Methods
hasPrefixCharacterFromSet:
Determines if the first character of this string is in the parameter characterSet.
- (BOOL)hasPrefixCharacterFromSet:(NSCharacterSet *)characterSet
Parameters
- characterSet
The character set to compare the first character of this string against.
Return Value
If the first character of this string is in character set.
Declared In
NSString+HTML.h
hasSuffixCharacterFromSet:
Determines if the last character of this string is in the parameter characterSet.
- (BOOL)hasSuffixCharacterFromSet:(NSCharacterSet *)characterSet
Parameters
- characterSet
The character set to compare the last character of this string against.
Return Value
If the last character of this string is in the character set.
Declared In
NSString+HTML.h
integerValueFromHex
Extract the numbers from this string and return them as an NSUInteger.
- (NSUInteger)integerValueFromHex
Return Value
An NSUInteger of the number characters in this string.
Declared In
NSString+HTML.h
isIgnorableWhitespace
Test whether the entire receiver consists of only whitespace characters.
- (BOOL)isIgnorableWhitespace
Return Value
YES
if the receiver only has whitespace and newline characters
Declared In
NSString+HTML.h
isNumeric
Test whether or not this string is numeric only.
- (BOOL)isNumeric
Return Value
If this string consists only of numeric characters 0-9.
Declared In
NSString+HTML.h
percentValue
Read through this string and store the numbers included, then divide them by 100 giving a percentage.
- (float)percentValue
Return Value
The numbers contained in this string, as a percentage.
Declared In
NSString+HTML.h
stringByAddingAppleConvertedSpace
Replaces occurences of more two or more spaces with a range of alternating non-breaking space and regular space. It also encloses these parts with a span of class ‘Apple-converted-space’
- (NSString *)stringByAddingAppleConvertedSpace
Declared In
NSString+HTML.h
stringByAddingHTMLEntities
Convert a string into a proper HTML string by converting special characters into HTML entities. For example: an ellipsis …
is represented by the entity …
in order to display it correctly across text encodings.
- (NSString *)stringByAddingHTMLEntities
Return Value
A string containing HTML that now uses proper HTML entities.
Declared In
NSString+HTML.h
stringByNormalizingWhitespace
Return a copy of this string with all whitespace characters replaced by space characters.
- (NSString *)stringByNormalizingWhitespace
Return Value
A copy of this string with only space characters for whitespace.
Declared In
NSString+HTML.h
stringByReplacingHTMLEntities
Convert a string from HTML entities into correct character representations using UTF8 encoding. For example: an ellipsis entity representy by …
is converted into …
.
- (NSString *)stringByReplacingHTMLEntities
Return Value
A string without HTML entities, instead having the actual characters formerly represented by HTML entities.
Declared In
NSString+HTML.h