作者herculus6502 (oh crap...)
看板Perl
标题[闲聊] 一行破(perl one liner)将中文化为骆驼文
时间Sun Mar 3 10:47:50 2013
一行破(perl one liner)将中文化为骆驼文(CamelCase)
perl -MLingua::Han::PinYin -e 'print join "", map(ucfirst,
Lingua::Han::PinYin->new()->han2pinyin(
"一行破(perl one liner)将中文化为骆驼文(CamelCase)")) ;'
执行结果︰YiXingPo(PERL ONE LINER)JiangZhongWenHuaWeiLuoTuoWen(CamelCase)
有感於很多环境对中文还是不太友善,还是暂时用英文混过去吧…
原文出处
http://sigmundtzeng.blogspot.tw/2013/03/perl-one-linercamelcase.html
--
Wingo's Research Principle:
The bigger the discovery,
the more likely it was made while testing for something else
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.166.172.228
1F:→ Bschord:满有趣的, 配合其他module应该大多unicode内的中文都能转 03/05 04:58
2F:→ Bschord:bopomofo了 感谢分享 03/05 04:58
3F:推 zard1989:推! 03/21 08:11