汉字转换成拼音
2016-01-07 19:50
316 查看
java代码
City entity=null;
if(city.getId()!=null){
entity =
this.getById(city.getId());
entity.setName(city.getName());
entity.setPid(city.getPid());
entity.setPinying(ChineseUtils.toPinyin(city.getName(),
PinyinFormat.TONELESS_PINYIN_FORMAT));
}
引用资源包
com/luhuiguo/chinese-utils/1.0/chinese-utils-1.0.jar
引用类
import com.luhuiguo.chinese.pinyin.Pinyin;
import com.luhuiguo.chinese.pinyin.PinyinFormat;
City entity=null;
if(city.getId()!=null){
entity =
this.getById(city.getId());
entity.setName(city.getName());
entity.setPid(city.getPid());
entity.setPinying(ChineseUtils.toPinyin(city.getName(),
PinyinFormat.TONELESS_PINYIN_FORMAT));
}
引用资源包
com/luhuiguo/chinese-utils/1.0/chinese-utils-1.0.jar
引用类
import com.luhuiguo.chinese.pinyin.Pinyin;
import com.luhuiguo.chinese.pinyin.PinyinFormat;
相关文章推荐
- java-首字母大小写
- 从nib文件里加载collectionViewCell
- The Triangle
- 安装ambari
- Oracle_字典
- OpenCL 优化后的卷积代码
- hdu 2819 Swap
- 组装list对象
- js全局变量问题
- js收藏
- Caffe学习系列(20):用训练好的caffemodel来进行分类
- mysql-数据类型与java数据类型转化工具类
- 获得系统时间
- 数据库之使用DML语句更改数据
- wpf连接数据库
- Spring Security 3.2.x与Spring 4.0.x的Maven依赖管理
- Ubuntu配置安装NFS服务器
- 06.C#线程Thread
- 关于支付宝异步通知的状态
- shell 如何判断某个文件名以某个字符开头