314件ヒット
[301-314件を表示]
(0.164秒)
別のキーワード
種類
- インスタンスメソッド (283)
- 特異メソッド (31)
キーワード
- << (12)
-
append
_ as _ bytes (1) - b (12)
- casecmp (12)
- concat (21)
- encode (36)
- encode! (24)
-
force
_ encoding (12) - iseuc (12)
- new (31)
- scrub (36)
- scrub! (36)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
-
valid
_ encoding? (12)
検索結果
-
String
# unicode _ normalize!(form = :nfc) -> self (33043.0) -
self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列に置き換えます。
...。
@raise Encoding::CompatibilityError self が Unicode 文字列ではない場合
に発生します。
//emlist[例][ruby]{
text = "a\u0300"
text.unicode_normalize!(:nfc)
text == "\u00E0" # => true
text.unicode_normalize!(:nfd)
text == "a\u0300"......# => true
//}
@see String#unicode_normalize, String#unicode_normalized?... -
String
# iseuc -> bool (33025.0) -
self が EUC-JP なバイト列として正当であるかどうかを判定します。
...self) と同じです。
//emlist[例][ruby]{
require 'kconv'
euc_str = "\
\xa5\xaa\xa5\xd6\xa5\xb8\xa5\xa7\xa5\xaf\xa5\xc8\xbb\xd8\xb8\xfe\
\xa5\xd7\xa5\xed\xa5\xb0\xa5\xe9\xa5\xdf\xa5\xf3\xa5\xb0\xb8\xc0\xb8\xec\
\x52\x75\x62\x79".force_encoding('EUC-JP')
sjis_str = "\
\x83\x49\x83\x75\x83\x57\......x83\x46\x83\x4e\x83\x67\x8e\x77\x8c\xfc\
\x83\x76\x83\x8d\x83\x4f\x83\x89\x83\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\
\x52\x75\x62\x79".force_encoding('Shift_JIS')
euc_str.iseuc # => true
sjis_str.iseuc # => false
//}...