7件ヒット
[1-7件を表示]
(0.044秒)
キーワード
- encode64 (1)
- hexencode (1)
-
strict
_ encode64 (1) - tolocale (1)
- u (1)
-
url
_ encode (1) -
urlsafe
_ encode64 (1)
検索結果
先頭5件
-
Digest
. # hexencode(string) -> String (18976.0) -
引数である文字列 string を、16進数に変換した文字列を生成して返します。
引数である文字列 string を、16進数に変換した文字列を生成して返します。
@param string 文字列を指定します。
//emlist[][ruby]{
require 'digest'
p Digest.hexencode("") # => ""
p Digest.hexencode("d") # => "64"
p Digest.hexencode("\1\2") # => "0102"
p Digest.hexencode("\xB0") # => "b0"
p digest = Digest::MD5.digest("ruby") # => "... -
Base64
. # urlsafe _ encode64(bin , padding: true) -> String (18646.0) -
与えられたデータを Base64 エンコードした文字列を返します。
与えられたデータを Base64 エンコードした文字列を返します。
このメソッドは 4648 の "Base 64 Encoding with URL and Filename Safe Alphabet" に対応しています。
"+" を "-" に "/" を "_" に置き換えます。
デフォルトでは戻り値は = によるパディングを含むことがあります。
パディングを含めたくない場合は、padding オプションに false を指定してください。
@param bin Base64 エンコードするデータを指定します。
@param padding false を指定した場合、 = によ... -
Base64
. # encode64(bin) -> String (18628.0) -
与えられたデータを Base64 エンコードした文字列を返します。
与えられたデータを Base64 エンコードした文字列を返します。
このメソッドは 2045 に対応しています。
エンコード後の文字で 60 文字ごとに改行を追加します。
@param bin Base64 エンコードするデータを指定します。
require 'base64'
Base64.encode64("Now is the time for all good coders\nto learn Ruby")
# => Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
# ... -
Base64
. # strict _ encode64(bin) -> String (18610.0) -
与えられたデータを Base64 エンコードした文字列を返します。
与えられたデータを Base64 エンコードした文字列を返します。
このメソッドは 4648 に対応しています。
改行コードを追加することはありません。
@param bin Base64 エンコードするデータを指定します。 -
ERB
:: Util . # url _ encode(s) -> String (9631.0) -
文字列 s を URLエンコードした文字列を返します。
文字列 s を URLエンコードした文字列を返します。
文字列 s 中に含まれる 2バイト文字や半角スペースについて URL エンコードを行った文字列を返します(CGI.escapeとほぼ同じです)。
@param s URLエンコードを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20P... -
Kconv
. # tolocale(str) -> String (379.0) -
文字列 str のエンコーディングをロケールエンコーディングに変換して返します。
文字列 str のエンコーディングをロケールエンコーディングに変換して返します。
ロケールエンコーディングについては Encoding.locale_charmap を見てください。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 String#encode
を使ってください。
Kconv.kconv(str, Encoding.locale_charmap)と同じです。
@param str 変換元の文字列
@see String#tolocale -
ERB
:: Util . # u(s) -> String (331.0) -
文字列 s を URLエンコードした文字列を返します。
文字列 s を URLエンコードした文字列を返します。
文字列 s 中に含まれる 2バイト文字や半角スペースについて URL エンコードを行った文字列を返します(CGI.escapeとほぼ同じです)。
@param s URLエンコードを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20P...