72件ヒット
[1-72件を表示]
(0.032秒)
別のキーワード
モジュール
- URI (38)
キーワード
- codepage (12)
- compile (11)
-
decode
_ www _ form _ component (12) - encode (7)
-
encode
_ www _ form _ component (12) - escape (7)
- new (11)
検索結果
先頭5件
-
URI
. decode _ www _ form _ component(str , enc=Encoding :: UTF _ 8) -> String (6125.0) -
URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。
...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。
通常は URI.decode_www_form を使うほうがよいでしょう。
"+" という文字は空白文字にデコードします。
enc で指定したエンコーディングの文字......ncoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
enc = URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
p URI.decode_......www_form_component(enc)
# => "Ruby リファレンスマニュアル"
//}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.decode_www_form... -
URI
. encode _ www _ form _ component(str , enc=nil) -> String (6119.0) -
文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。
...文字列を URL-encoded form data の1コンポーネント
としてエンコードした文字列を返します。
通常は URI.encode_www_form を使うほうがよいでしょう。
このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他......ttps://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
p URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9%E3%8......3%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
//}
@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form... -
URI
. encode(str , unsafe = URI :: UNSAFE) -> String (6107.0) -
URI 文字列をエンコードした文字列を返します。
...I 文字列をエンコードした文字列を返します。
このメソッドは obsolete です。
代わりに
ERB::Util.#url_encode,
CGI.escape,
URI.encode_www_form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は... -
WIN32OLE
. codepage -> Integer (6107.0) -
WIN32OLEがOLEオートメーションのインターフェイスに利用するコードページを 取得します。
...ージを
取得します。
OLEオートメーションに利用する文字列はUnicodeでエンコードします。
WIN32OLEはここで示されたコードページを利用してRubyのStringとUnicodeの相
互変換を行います。
ロード時の既定値はEncoding.default_internal......するコード
ページが見つからない場合は、WIN32OLE::CP_ACPを利用します。
@return WIN32OLEがオートメーション呼び出しの文字列変換に利用するコード
ページを返します。
WIN32OLE.codepage # => 932 (日本語Windowsの既定値)... -
URI
. escape(str , unsafe = URI :: UNSAFE) -> String (3007.0) -
URI 文字列をエンコードした文字列を返します。
...I 文字列をエンコードした文字列を返します。
このメソッドは obsolete です。
代わりに
ERB::Util.#url_encode,
CGI.escape,
URI.encode_www_form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は... -
Regexp
. compile(string , option = nil , code = nil) -> Regexp (115.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...して見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と同じになります。
@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8BIT になります。
それ......の指定は警告を出力します。
@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。
//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
th... -
Regexp
. new(string , option = nil , code = nil) -> Regexp (115.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...して見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と同じになります。
@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8BIT になります。
それ......の指定は警告を出力します。
@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。
//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
th...