Latest 1.0.0
Homepage https://github.com/ZHIOSLIB/ZHFoundation
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, ImageIO, UIKit
Authors

Foundation框架的扩展

部分示例

判空

BOOL isblank = [NSString isBlankString:@""];
NSLog(@"空字符-%d", isblank);

取数字

NSString *price = [NSString getNumberFromString:@"价格100元"];
NSLog(@"数字-%@", price);

金额大写

NSString *hanzi = [NSString chineseCapitalNumber:1234];
NSLog(@"大写数字-%@", hanzi);

拼音

NSString *pinyin = [NSString pinYin:@"我是谁"];
NSLog(@"拼音-%@", pinyin);

时间戳

long long timestamp = [NSDate timestampFromString:@"2222年02月02日" withStyle:DateConvertStyleChinese];
NSLog(@"时间戳-%lld", timestamp);
NSString *time = [NSDate stringFromTimestamp:timestamp withStyle:DateConvertStyleChinese];
NSLog(@"时间-%@", time);
NSDate *date = [NSDate dateFromTimestamp:timestamp withStyle:DateConvertStyleChinese];
NSLog(@"时间-%@", date);

Latest podspec

{
    "name": "ZHFoundation",
    "version": "1.0.0",
    "summary": "Foundationu7684u6269u5c55",
    "description": "Foundationu7684u6269u5c55",
    "homepage": "https://github.com/ZHIOSLIB/ZHFoundation",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "leezhihua": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ZHIOSLIB/ZHFoundation.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "ZHFoundation/Classes/PinYin4Objc/**/*",
        "ZHFoundation/Classes/*.{h,m}"
    ],
    "frameworks": [
        "Foundation",
        "ImageIO",
        "UIKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This