Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 625 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 625 Bytes

pinyin-conversion

Objective-C tool that converts pinyin NSStrings in numerical form (ni3 hao3) to a diacritical form (nǐ hǎo)

About

This code can be used to convert numerical pinyin strings to strings that place the tone mark over the vowel. It follows the rules named in the wikipedia article on pinyin.

Usage

[PinyinConversion convertPinyin:@"ni3 hao3"]
  --> @"nǐ hǎo"

It is intended to be used with single words or word groups (input is separated by white spaces and joined by spaces after conversion).