46 lines
1.1 KiB
Objective-C
46 lines
1.1 KiB
Objective-C
//
|
||
// NSString+Regex.h
|
||
// YUMI
|
||
//
|
||
// Created by YUMI on 2021/9/14.
|
||
//
|
||
|
||
#import <Foundation/Foundation.h>
|
||
|
||
NS_ASSUME_NONNULL_BEGIN
|
||
|
||
@interface NSString (Utils)
|
||
|
||
///是否是正确的手机号
|
||
- (BOOL)isPhoneNumber;
|
||
|
||
|
||
///MD5加密
|
||
- (NSString *)MD5String;
|
||
|
||
+ (BOOL)versionCompareOldStr:(NSString *)first andNewStr: (NSString *)second;
|
||
|
||
///数字转化为万
|
||
+ (NSString *)getDealNumwithstring:(NSString *)string;
|
||
///数字转化为十万
|
||
+(NSString *)getDealTenNumWithString:(NSString *)string;
|
||
|
||
///时间戳转化为需要显示的内容
|
||
+ (NSString *)stringWithTimeStamp:(NSString *)timeStamp;
|
||
///通过生日获取星座
|
||
+ (NSString *)calculateConstellationWithMonth:(long)time;
|
||
///通过生日获取星座
|
||
+ (NSString *)getCalculateConstellationTextWithMonth:(long)time;
|
||
///通过生日获取星座图片
|
||
+ (NSString *)getCalculateConstellationImageWithMonth:(long)time;
|
||
///得到年龄
|
||
+(NSString *)getAgeWithBirth:(long)birth;
|
||
///得到区号
|
||
+(NSString *)getCountryCode;
|
||
///产生唯一的key,用于图片或文件上传
|
||
+ (NSString *)createUUID;
|
||
@end
|
||
|
||
|
||
NS_ASSUME_NONNULL_END
|