pinyin.h
457 Bytes
/*
* pinyin.h
* Chinese Pinyin First Letter
*
* Created by George on 4/21/10.
* Copyright 2010 RED/SAFI. All rights reserved.
*
*/
/*
* // Example
*
* #import "pinyin.h"
*
* NSString *hanyu = @"中文测试文字!";
* for (int i = 0; i < [hanyu length]; i++)
* {
* printf("%c", pinyinFirstLetter([hanyu characterAtIndex:i]));
* }
*
*/
#define ALPHA @"ABCDEFGHIJKLMNOPQRSTUVWXYZ#"
char pinyinFirstLetter(unsigned short hanzi);