SwiftPinYin 1.0.2

SwiftPinYin 1.0.2

Maintained by yangentao.



  • By
  • yangentao

SwiftPinYin

CI Status Version License Platform

Example

import SwiftPinYin

let s = PinYin.findOne(c: "") {
	String($0)
}
print("臷:[" + s + "]")

let s = PinYin.findAll(s: "杨恩涛1a")
print(s)

let s = PinYin.findAll(set: Set<Character>("杨恩涛2c")) {
	String($0)
}
print(s)

outputs:

臷:[zhi2 die2]                                     //0.15秒, 第一次运行, 从文件加载数据.
["恩": "en1", "涛": "tao1", "杨": "yang2"]          //0.00035秒
["恩": "en1", "涛": "tao1", "c": "c", "杨": "yang2", "2": "2"] //0.00016秒

Requirements

Installation

SwiftPinYin is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwiftPinYin'

Author

yangentao, [email protected]

License

SwiftPinYin is available under the MIT license. See the LICENSE file for more info.