jisx0208 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jisx0208/processor.rb +6 -0
- data/lib/jisx0208/version.rb +1 -1
- data/lib/jisx0208.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81169ebbbff0fd9c19b339eda72d3b6b56a2cb7b2924e78e7692592e09b5d431
|
4
|
+
data.tar.gz: 987e03026f974ce7ed2a880ab88eee6bfd528b43d69dfa3672af29569c1d1fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2a4199696e16c9c95e21d80d213c971c2dc726d6cd0930bd9b50c608238fccbbed3ca14b33413329e4b8b715f9314429516c4453fe4c1315cd056e767557a69
|
7
|
+
data.tar.gz: 7b7846ccab60688360110c4ae3cb4afd9ffd0aefbbc1ec93f8c8b6328a05ffc1bfafb25b446f421e4bb8cc14694110aca0ce0a9e9539cca6c56891052a0850ed
|
data/lib/jisx0208/processor.rb
CHANGED
@@ -56,6 +56,12 @@ module JISX0208
|
|
56
56
|
string.each_char.all? { |char| jisx0208.include?(char.ord) }
|
57
57
|
end
|
58
58
|
|
59
|
+
# hiragana, katakana, multi byte symbols, first level kanji
|
60
|
+
def only_common_japanese_characters?(string)
|
61
|
+
common = @others_ranges + @first_level_ranges
|
62
|
+
string.each_char.all? { |char| common.include?(char.ord) }
|
63
|
+
end
|
64
|
+
|
59
65
|
private
|
60
66
|
|
61
67
|
def collect_unicode_set(mappings, jisx_start, jisx_end)
|
data/lib/jisx0208/version.rb
CHANGED
data/lib/jisx0208.rb
CHANGED