NSString(SFAdditions) Category Reference
Declared in | NSString+SFAdditions.h |
---|
+ sfsdk_stringWithHexData:
A hex string representation of the supplied data; or nil
if data
is nil
or empty.
+ (nullable NSString *)sfsdk_stringWithHexData:(nullable NSData *)data
Parameters
data |
NSData to be represented as a base 16 string. |
---|
Return Value
A hex string representation of the supplied data; or nil
if data
is nil
or empty.
Declared In
NSString+SFAdditions.h
– sfsdk_sha256
Returns an SHA 256 hash of the current string
- (NSData *)sfsdk_sha256
Declared In
NSString+SFAdditions.h
+ sfsdk_escapeXMLCharacter:
Escape XML entities
+ (nullable NSString *)sfsdk_escapeXMLCharacter:(nullable NSString *)value
Parameters
value |
String value to escape. If nil is passed, this method will return nil. |
---|
Declared In
NSString+SFAdditions.h
+ sfsdk_unescapeXMLCharacter:
unescape XML entities
+ (nullable NSString *)sfsdk_unescapeXMLCharacter:(nullable NSString *)value
Parameters
value |
String value to unescape. If nil is passed, this method will return nil. |
---|
Declared In
NSString+SFAdditions.h
– sfsdk_trim
Trim string by taking out beginning and ending space.
- (NSString *)sfsdk_trim
Declared In
NSString+SFAdditions.h
– sfsdk_redacted
Returns the string in debug build or a redacted version of it for production build
- (NSString *)sfsdk_redacted
Declared In
NSString+SFAdditions.h
– sfsdk_redactedWithPrefix:
Returns the string in debug build or a redacted version of it for production build. The prefix length is the number of characters that won’t be redacted from the beginning of the string.
- (NSString *)sfsdk_redactedWithPrefix:(NSUInteger)prefixLength
Parameters
prefixLength |
The number of characters to preserve at the beginning of the string. |
---|
Declared In
NSString+SFAdditions.h
+ sfsdk_isEmpty:
Return YES if string is nil or length is 0 or with white space only
+ (BOOL)sfsdk_isEmpty:(nullable NSString *)string
Parameters
string |
String to check |
---|
Declared In
NSString+SFAdditions.h
– removeWhitespaces
Returns a string after taking out any space
- (NSString *)removeWhitespaces
Declared In
NSString+SFAdditions.h
– sfsdk_stringByURLEncoding
A string with all non-legal URL characters (per RFC 3986) escaped.
- (NSString *)sfsdk_stringByURLEncoding
Return Value
A string with all non-legal URL characters (per RFC 3986) escaped.
Declared In
NSString+SFAdditions.h
– sfsdk_stringByStrippingHTML
Strips any HTML markup from the source string.
- (NSString *)sfsdk_stringByStrippingHTML
Declared In
NSString+SFAdditions.h
– stringWithTitleCharacter
Returns an uppercase title character for the string without accents or other diacritic marks. Intended for use with UI index titles.
- (NSString *)stringWithTitleCharacter
Declared In
NSString+SFAdditions.h
– queryStringComponents
Returns a dictionary of query string components for the string object.
- (NSDictionary *)queryStringComponents
Declared In
NSString+SFAdditions.h
– sfsdk_isEmptyOrWhitespaceAndNewlines
Returns YES if the string is empty of contains only whitespance or newline characters.
- (BOOL)sfsdk_isEmptyOrWhitespaceAndNewlines
Declared In
NSString+SFAdditions.h
– sfsdk_entityId18
The 18 character case-insensitive entity ID representing the receiver.
Returns nil
if the receiver is not a valid Salesforce entity ID.
- (nullable NSString *)sfsdk_entityId18
Return Value
The 18 character case-insensitive entity ID representing the receiver.
Returns nil
if the receiver is not a valid Salesforce entity ID.
Declared In
NSString+SFAdditions.h
– sfsdk_isEqualToEntityId:
Returns a Boolean value that indicates if the given entity ID is equal to the receiver. The comparison properly handles comparing 15 character case-sensitive ID’s against 18 character case-insensitive ID’s.
- (BOOL)sfsdk_isEqualToEntityId:(NSString *)entityId
Parameters
entityId |
The entity ID to compare with the receiver. |
---|
Return Value
Returns YES
if the given entityId is semantically equal to the receiver,
otherwise returns NO
. Returns NO
if either the given ID or receiver are not
valid Salesforce entity ID’s.
Declared In
NSString+SFAdditions.h