Skip to content

NSStringAdditions

Roselifeye edited this page Apr 21, 2016 · 3 revisions

NSString Additions

//  Get the document path.
+ (NSString *)getDocumentDirectory;

//  Get the app version.
+ (NSString *)getAppVersion;

//  Get the app build version.
+ (NSString *)getBuildVersion;

//  Distinguish the string value is email format or not.
- (BOOL)isEmail;

/**
 *  Distinguish the string value is phone number format or not.
 *  PS: In this function, the length of the phone number is only 11.
 */
- (BOOL)isPhoneNumber;