NSString(TKCategory) Category Reference
| Declared in | NSString+TKCategory.h NSString+TKCategory.m |
Tasks
-
emailproperty -
stripWhitespaceproperty -
stripWhitepspaceAndNewlinesproperty -
URLEncodeproperty -
escapeHTMLproperty -
unescapeHTMLproperty -
stringByRemovingHTMLproperty -
md5sumproperty -
– hasString: -
lengthWithoutWhitespaceproperty -
stringWithoutWhitespaceproperty -
creditCardTypeproperty -
validCreditCardNumberproperty -
– formattedPhoneNumberWithLastCharacterRemoved:
Properties
URLEncode
Returns a NSString that is URL friendly.
@property (nonatomic, readonly, copy) NSString *URLEncodeReturn Value
A URL encoded string.
Declared In
NSString+TKCategory.hcreditCardType
Returns the credit card type based on the first for digits of the card number.
@property (nonatomic, readonly, copy) NSString *creditCardTypeReturn Value
A credit card company name if the number matches a company otherwise nil.
Declared In
NSString+TKCategory.hReturns YES if a string is a valid email address, otherwise NO.
@property (nonatomic, getter=isEmail, readonly) BOOL emailReturn Value
True if the string is formatted properly as an email address.
Declared In
NSString+TKCategory.hescapeHTML
Returns a NSString that properly replaces HTML specific character sequences.
@property (nonatomic, readonly, copy) NSString *escapeHTMLReturn Value
An escaped HTML string.
Declared In
NSString+TKCategory.hlengthWithoutWhitespace
Returns the length of the string minus the whitespace characters.
@property (nonatomic, readonly) NSUInteger lengthWithoutWhitespaceReturn Value
Returns the length of the string minus the whitespace characters.
Declared In
NSString+TKCategory.hmd5sum
Returns an MD5 string of from the given NSString.
@property (nonatomic, readonly, copy) NSString *md5sumReturn Value
A MD5 string.
Declared In
NSString+TKCategory.hstringByRemovingHTML
Returns a NSString that removes HTML elements.
@property (nonatomic, readonly, copy) NSString *stringByRemovingHTMLReturn Value
Returns a string without the HTML elements.
Declared In
NSString+TKCategory.hstringWithoutWhitespace
Returns a string without the whitespace characters.
@property (nonatomic, readonly) NSString *stringWithoutWhitespaceReturn Value
Returns a string without the whitespace characters.
Declared In
NSString+TKCategory.hstripWhitepspaceAndNewlines
Returns a NSString that removes blank space and new lines from the start and end of string.
@property (nonatomic, readonly, copy) NSString *stripWhitepspaceAndNewlinesReturn Value
A stripped string.
Declared In
NSString+TKCategory.hstripWhitespace
Returns a NSString that removes blank space from the start and end of string.
@property (nonatomic, readonly, copy) NSString *stripWhitespaceReturn Value
A stripped string.
Declared In
NSString+TKCategory.hunescapeHTML
Returns a NSString that properly formats text for HTML.
@property (nonatomic, readonly, copy) NSString *unescapeHTMLReturn Value
An unescaped HTML string.
Declared In
NSString+TKCategory.hvalidCreditCardNumber
Returns YES if the card number passes the Luhn algorithm. No spaces in the card number.
@property (nonatomic, getter=isValidCreditCardNumber, readonly) BOOL validCreditCardNumberReturn Value
Returns YES if the card is a valid credit card number, otherwise NO.
Declared In
NSString+TKCategory.hInstance Methods
formattedPhoneNumberWithLastCharacterRemoved:
Returns a formatted phone number. So it’d transform a string 18005555555 would be 1-800-555-5555.
- (NSString *)formattedPhoneNumberWithLastCharacterRemoved:(BOOL)deleteLastCharParameters
- deleteLastChar
Remove the last character from the string.
Return Value
Returns an NSString that transform a string of numbers into a string human readable phone number.
Declared In
NSString+TKCategory.h