Files
peko-ios/YuMi/Tools/NSString/NSString+Utils.h

45 lines
1009 B
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;
@end
NS_ASSUME_NONNULL_END