用于处理“常规英文字母”的NSString和表情符号,如表情符号或日语 [英] NSString to treat "regular english alphabets" and characters like emoji or japanese uniformly
本文介绍了用于处理“常规英文字母”的NSString和表情符号,如表情符号或日语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个textView,我可以在其中输入字符。字符可以是a,b,c,d等,或使用表情符号键盘添加笑脸。
There is a textView in which I can enter Characters. characters can be a,b,c,d etc or a smiley face added using emoji keyboard.
-(void)textFieldDidEndEditing:(UITextField *)textField{
NSLog(@"len:%lu",textField.length);
NSLog(@"char:%c",[textField.text characterAtIndex:0]);
}
目前,上述功能提供以下输出
Currently , The above function gives following outputs
这篇关于用于处理“常规英文字母”的NSString和表情符号,如表情符号或日语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文