Swiftpack.co - yangentao/SwiftPinYin as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by yangentao.
yangentao/SwiftPinYin 1.0.2
拼音, pinyin, swift, ios
⭐️ 0
🕓 4 weeks ago
iOS macOS
.package(url: "https://github.com/yangentao/SwiftPinYin.git", from: "1.0.2")

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.

GitHub

link
Stars: 0
Last commit: 4 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

3 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics