看板 [ Perl ]
討論串[問題] length (unicode string)?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者easy1 (e :) y)時間19年前 (2006/05/05 05:58), 編輯資訊
0
0
0
內容預覽:
引述《easy1 (e :) y)》之銘言:. 恩 自己找了一下. use String::Multibyte;. $utf8 = String::Multibyte->new('UTF8');. $utf8_length = $utf8->length($utf8_string);. --.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者easy1 (e :) y)時間19年前 (2006/05/05 05:30), 編輯資訊
0
0
0
內容預覽:
$str = "中文"; # in utf-8. length($str) => 6. length會傳回byte length. 有什麼辦法(CPAN) 可以傳回length of character. $str = "abc中文" # in utf-8. length($str) => 5 ..
首頁
上一頁
1
下一頁
尾頁