44件ヒット
[1-44件を表示]
(0.040秒)
キーワード
- isjis (11)
- tolocale (11)
-
urlsafe
_ decode64 (11) -
urlsafe
_ encode64 (11)
検索結果
先頭4件
-
Kconv
. # tolocale(str) -> String (126.0) -
文字列 str のエンコーディングをロケールエンコーディングに変換して返します。
... Encoding.locale_charmap を見てください。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 String#encode
を使ってください。
Kconv.kconv(str, Encoding.loc......ale_charmap)と同じです。
@param str 変換元の文字列
@see String#tolocale... -
Base64
. # urlsafe _ decode64(str) -> String (108.0) -
与えられた文字列を Base64 デコードしたデータを返します。
...与えられた文字列を Base64 デコードしたデータを返します。
このメソッドは 4648 の "Base 64 Encoding with URL and Filename Safe Alphabet" に対応しています。
"+" を "-" に "/" を "_" に置き換えます。
@param str Base64 デコードする文字列を... -
Base64
. # urlsafe _ encode64(bin , padding: true) -> String (108.0) -
与えられたデータを Base64 エンコードした文字列を返します。
...与えられたデータを Base64 エンコードした文字列を返します。
このメソッドは 4648 の "Base 64 Encoding with URL and Filename Safe Alphabet" に対応しています。
"+" を "-" に "/" を "_" に置き換えます。
デフォルトでは戻り値は = による... -
Kconv
. # isjis(str) -> bool (19.0) -
文字列 str が ISO-2022-JP なバイト列として正当であるかどうかを判定します。
...r 判定対象の文字列
@see String#isjis
//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')
jis_str = "\
\x1b\x......24\x42\x25\x2a\x25\x56\x25\x38\x25\x27\x25\x2f\x25\x48\x3b\x58\x38\x7e\
\x25\x57\x25\x6d\x25\x30\x25\x69\x25\x5f\x25\x73\x25\x30\x38\x40\x38\x6c\x1b\x28\x42\
\x52\x75\x62\x79".force_encoding('ISO-2022-JP')
euc_str.isjis # => false
jis_str.isjis # => true
//}...