作者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
→ Bschord:滿有趣的, 配合其他module應該大多unicode內的中文都能轉 03/05 04:58
→ Bschord:bopomofo了 感謝分享 03/05 04:58
推 zard1989:推! 03/21 08:11