Mobile API Reference
MicroStrategy 2019
|
#import <MSIStringUtils.h>
Class Methods | |
(NSString *) | + xmlEncode: |
(NSString *) | + getDateForDisplay: |
(NSString *) | + getDateForDisplayShortTime: |
(BOOL) | + string:isEqualTo: |
(BOOL) | + string:isNotEqualTo: |
(NSString *) | + xmlDecode: |
(NSString *) | + newGUID |
(NSDictionary *) | + getURLParameters: |
(NSDictionary *) | + getQueryStringParameters: |
(NSString *) | + getQueryString: |
(BOOL) | + isEmpty: |
(BOOL) | + isNotEmpty: |
(NSString *) | + urlWithPrefix:paramDictionary: |
(NSString *) | + newUTF8StringFromNSData: |
(NSString *) | + replaceHTMLCodes: |
(NSString *) | + decodedUrlString:decodeSpace: |
(NSInteger) | + compareServerVersion:toVersion: |
(NSInteger) | + compareIServerVersion:toVersion: |
(BOOL) | + isURLStringsConnectingToSameServer:andURLString: |
(NSString *) | + replaceLinkDrillEncodedCharacters: |
(NSString *) | + addInAppParameterForURL: |
(NSString *) | + replaceURLScheme:withScheme: |
StringUtils provides utility functions to manipulate strings.
+ (NSString*) addInAppParameterForURL: | (NSString *) | urlString |
Kun: add inApp parameter for url string
+ (NSInteger) compareIServerVersion: | (NSString *) | fromVersion | |
toVersion: | (NSString *) | toVersion | |
Compares two MicroStrategy iserver versions. Empty version always loses. Version structure assumed to be major.minor.release1.release2. Precedence is major>minor>release1>release2. For a.b.c.d, we check a then b then c then d
fromVersion | The first version |
toVersion | The second version |
+ (NSInteger) compareServerVersion: | (NSString *) | fromVersion | |
toVersion: | (NSString *) | toVersion | |
Compares two MicroStrategy versions. Empty version always loses. Version structure assumed to be major.minor.release1.release2. Precedence is major>minor>release2>release1. For a.b.c.d, we check a then b then d then c
fromVersion | The first version |
toVersion | The second version |
+ (NSString*) decodedUrlString: | (NSString *) | urlString | |
decodeSpace: | (BOOL) | decodeSpaceChar | |
Decode an encoded url string.
urlString | encoded URL string |
decodeSpaceChar | whether to decode the '+' to ' '(space) character |
+ (NSString*) getDateForDisplay: | (NSTimeInterval) | inputDate |
Get string representation of a date for display purpose
inputDate | the date in milliseconds |
+ (NSString*) getDateForDisplayShortTime: | (NSTimeInterval) | inputDate |
Get string representation of a date for display purpose with short time string
inputDate | the date in milliseconds |
+ (NSString*) getQueryString: | (NSDictionary *) | queryParameters |
Construct a query string by key value pair of query parameters
queryParameters | key value pair of query parameters |
+ (NSDictionary*) getQueryStringParameters: | (NSString *) | query |
Get the parameter pairs in the URL query string. The URL query string has the format of param1=value1¶m2=value2&...
query | the URL query string to be process |
+ (NSDictionary*) getURLParameters: | (NSString *) | url |
Get the parameter pairs in URL. The URL has the format of baseUrl?param1=value1¶m2=value2&...
url | the url to be processed |
+ (BOOL) isEmpty: | (NSString *) | input |
Check whether a input string is empty, the string can either be nil or contain no characters
string | to be checked |
+ (BOOL) isNotEmpty: | (NSString *) | input |
Check whether a string is not empty.
+ (BOOL) isURLStringsConnectingToSameServer: | (NSString *) | urlString1 | |
andURLString: | (NSString *) | urlString2 | |
Compare two url strings to see if they are connecting to the same server
urlString1 | The first url string |
urlString2 | The second url string |
+ (NSString*) newGUID |
Generate a globally unique ID. The GUID has the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ (NSString*) newUTF8StringFromNSData: | (NSData *) | data |
Converts the data to the string using UTF8Encoding. The caller is responsible for releasinge the string.
data | NSData |
+ (NSString*) replaceHTMLCodes: | (NSString *) | input |
Replaces the HTML codes like 
,   and returns a new string E.g,: 
 : newline   : space
input | string contains HTML codes |
+ (NSString*) replaceLinkDrillEncodedCharacters: | (NSString *) | inputString |
Replace special encoded characters in link drill URL, and return the new URL. "&#38;" to "&" "#" to @"#" ";" to @";" ">" to @">" "<" to @"<" """ to @""" " " to @" "
inputString | the source string |
+ (NSString*) replaceURLScheme: | (NSString *) | urlString | |
withScheme: | (NSString *) | scheme | |
Change the URL scheme to a new scheme
urlString | url string to be changed |
scheme | new scheme |
+ (BOOL) string: | (NSString *) | str1 | |
isEqualTo: | (NSString *) | str2 | |
Check whether two strings contain same characters. Both strings can be nil. Case sensitive.
str1 | the first string to be compared |
str2 | the second string to be compared |
+ (BOOL) string: | (NSString *) | str1 | |
isNotEqualTo: | (NSString *) | str2 | |
Check whether two strings contain different characters. Both strings can be nil. Case sensitive.
str1 | the first string to be compared |
str2 | the second string to be compared |
+ (NSString*) urlWithPrefix: | (NSString *) | prefix | |
paramDictionary: | (NSDictionary *) | params | |
Creates a url string from the base URL and the (name, value) pairs as parameters.
prefix | base URL with the form "http://www.mstr.com" |
params | key value pairs of paramters dictionary |
+ (NSString*) xmlDecode: | (NSString *) | inputString |
Decode xml string
inputString | encoded string |
+ (NSString*) xmlEncode: | (NSString *) | inputString |
Encode special characters in xml string.
inputString | original string |