-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNSString+CateString.h
More file actions
executable file
·56 lines (43 loc) · 1.32 KB
/
NSString+CateString.h
File metadata and controls
executable file
·56 lines (43 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// NSString+CateString.h
//
// Created by wjg on 22/09/2017.
// Copyright © 2017 wjg All rights reserved.
//
#import <Foundation/Foundation.h>
typedef enum NSComparisonResultAlias : NSInteger {
NSOrderedAscendingAlias = NSOrderedAscending,
NSOrderedSameAlias=NSOrderedSame,
NSOrderedDescendingAlias=NSOrderedDescending,
NSComparisonOccurError=-999
} NSComparisonResultAlias;
@interface NSString (CateString)
#pragma mark - Base
/**
* @abstract judgment string whether content.length==0/nil/NULL or not.
*
* @param string type:NSString.
*
* @return BOOL(YES,content is empty).
*/
+(BOOL)isEmptyString:(NSString *)string;
/**
* @abstract delete string both end white space.
*
* @param string type:NSString.
*
* @return new string that deleted both end white space.
*/
+(NSString *)stringByTrimmingBothEndWhiteSpace:(NSString *)string;
#pragma mark - Extend
/**
@Description compare versionString
@param versionStringB versionStringB
@return NSComparisonResultAlias
@discussion the versionString format should conform"major.minor.patch"
the component value is useful(e.g "10.1.0").it must not like "10.01.0".
*/
-(NSComparisonResultAlias)versionStringCompare:(NSString *)versionStringB;
#pragma mark - about MD5
+(NSString *)generateStringMD5:(nonnull NSString *)string;
@end