Latest 1.0.0
Homepage https://github.com/youran1024/HTChineseHandle
License MIT
Platforms ios 7.0, requires ARC
Authors

License MIT
Badge w/ Version
Badge w/ Platform

Instruction

汉字拼音的处理方法,在一些需要提取汉字拼音首字母,或者通过汉字拼音首字母进行分类并排序的项目里,是非常有用的,希望大家喜欢~

Installation

pod 'HTChineseLetter`

Method Instruction

  • @interface NSString (FirstLetter)
//  获取第一个汉字拼音首字母
- (NSString *)firstLetter;

//  获取所有汉字拼音首字母
- (NSString *)firstLetters;
  • @interface NSArray (FirstLetterArray)

//  如果给定的数组对象里边都是字符串则调用此方法
- (NSDictionary *)sortedArrayUsingFirstLetter;

//  如果给定的数组里边是Model,或者字典则用这个,并且给出KeyPath
- (NSDictionary *)sortedArrayUsingFirstLetterByKeypath:(NSString *)keyPath;

Thanks

感谢提供pinyin文件的却未曾相识的George同志~

write the code, enjoy the world

Power by Mr.Yang

Latest podspec

{
    "name": "HTChineseHandle",
    "version": "1.0.0",
    "summary": "To get first letter of Chinese",
    "homepage": "https://github.com/youran1024/HTChineseHandle",
    "license": "MIT",
    "authors": {
        "Mr.Yang": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/youran1024/HTChineseHandle.git",
        "tag": "1.0.0"
    },
    "source_files": "HTChineseHandleSDK/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This