Created
February 17, 2016 09:35
-
-
Save pocotan001/4b64598c6efd114a663f to your computer and use it in GitHub Desktop.
コードポイントから絞る簡易版。→のがちゃんとしてる https://github.com/komagata/eastasianwidth
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
// Basic Latin (0000–007F) http://unicode.org/charts/PDF/U0000.pdf | |
// Halfwidth Katakana (FF61–FF9F) http://unicode.org/charts/PDF/UFF00.pdf | |
function isHalfWidth(string) { | |
return /[\u0000-\u007f\uff61-\uff9f]/.test(string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment