-
-
Save kachick/4214980 to your computer and use it in GitHub Desktop.
Rubyを使ってタイ語の表示文字単位で文字列を区切る ref: http://qiita.com/items/55c4347df63472346ac8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# http://qiita.com/items/55c4347df63472346ac8 | |
thai_str = "พี่ชาย" | |
thai_chars = thai_str.scan(/.(?:[\u0E31]|[\u0E33-\u0E3A]|[\u0E47-\u0E4E])*/) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment