统计字符串中每个字符出现的次数
Pelr:
perl -e '$/=undef;$_=<>; printf "$&:%d\n", s/$&//g while /\S/;' test.txt
Java:
参考:
http://topic.csdn.net/u/20071031/21/25716ed2-64b5-44a5-b335-e61ca5ee4356.html
http://www.docin.com/p-44064652.html
perl -e '$/=undef;$_=<>; printf "$&:%d\n", s/$&//g while /\S/;' test.txt
参考:
http://topic.csdn.net/u/20071031/21/25716ed2-64b5-44a5-b335-e61ca5ee4356.html
http://www.docin.com/p-44064652.html