146件ヒット
[101-146件を表示]
(0.188秒)
クラス
-
URI
:: Generic (12)
キーワード
- decode (7)
-
decode
_ www _ form (12) -
decode
_ www _ form _ component (12) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - encode (7)
-
encode
_ www _ form (12) -
encode
_ www _ form _ component (12) - escape (7)
-
strongly
_ connected _ components (12) - unescape (7)
検索結果
先頭5件
-
URI
. encode _ www _ form(enum , enc=nil) -> String (113.0) -
enum から URL-encoded form data を生成します。
...x yz"]])
# => "a=1&b=2&c=x+yz"
実際には、each のブロック呼び出しで [key, value] の形のデータを渡すものであれば
何でも渡すことができます(例えば Hash など)。
require 'uri'
URI.encode_www_form({"a"=>"1", "b"=>"2", "c"=>"x yz"})
# => "a=1&b=2&c=x....../form-data をつかうべきで
このメソッドを使うべきではありません。
このメソッドは内部的に
URI.encode_www_form_component
を使っています。
このメソッドは
https://url.spec.whatwg.org/#concept-urlencoded-serializer
にもとづいて実装されてい......ます。
@param enum エンコードするデータ列([key, value] という形のデータの列)
@param enc 指定された場合、パーセントエンコーディングする前に、このエンコーディングに変換
@see URI.encode_www_form_component, URI.decode_www_form... -
URI
. decode(str) -> String (107.0) -
URI 文字列をデコードした文字列を返します。
...に
CGI.unescape,
URI.decode_www_form,
URI.decode_www_form_component
などの使用を検討してください。
例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/images?q=%A5%E2%A5%CA%A5%EA%A5%B6&ie=EUC-JP')
#=> "http://images.google.co.jp/images?q=モナリザ&ie=EUC-JP"... -
URI
. decode _ www _ form(str , enc=Encoding :: UTF _ 8) -> [[String , String]] (107.0) -
文字列から URL-encoded form data をデコードします。
...e 'uri'
ary = URI.decode_www_form("a=1&a=2&b=3")
p ary #=> [['a', '1'], ['a', '2'], ['b', '3']]
p ary.assoc('a').last #=> '1'
p ary.assoc('b').last #=> '3'
p Hash[ary] #=> {"a"=>"2", "b"=>"3"}
@param str デコード対象の文字列
@param enc エンコーデ......ィング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.decode_www_form_component, URI.encode_www_form... -
URI
. encode(str , unsafe = URI :: UNSAFE) -> String (107.0) -
URI 文字列をエンコードした文字列を返します。
...form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は 29293 からのスレッドを参照してください。
例:
require 'uri'
p URI.escape('http://images.google.co.jp/images?q=モナリザ&ie=EUC-JP')
#=> "ht... -
URI
. escape(str , unsafe = URI :: UNSAFE) -> String (107.0) -
URI 文字列をエンコードした文字列を返します。
...form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は 29293 からのスレッドを参照してください。
例:
require 'uri'
p URI.escape('http://images.google.co.jp/images?q=モナリザ&ie=EUC-JP')
#=> "ht... -
URI
. unescape(str) -> String (107.0) -
URI 文字列をデコードした文字列を返します。
...に
CGI.unescape,
URI.decode_www_form,
URI.decode_www_form_component
などの使用を検討してください。
例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/images?q=%A5%E2%A5%CA%A5%EA%A5%B6&ie=EUC-JP')
#=> "http://images.google.co.jp/images?q=モナリザ&ie=EUC-JP"...