るりまサーチ

最速Rubyリファレンスマニュアル検索!
62件ヒット [1-62件を表示] (0.243秒)
トップページ > クエリ:@[x] > クエリ:decode_www_form[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

モジュール

検索結果

URI.decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]] (18137.0)

文字列から URL-encoded form data をデコードします。

...= 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.decode_www_form_component(str, enc=Encoding::UTF_8) -> String (6143.0)

URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。

...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。

通常は URI.decode_www_form を使うほうがよいでしょう。

"+" という文字は空白文字にデコードします。

enc で指定したエンコーディングの文字...
...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_c...

URI.encode_www_form(enum, enc=nil) -> String (24.0)

enum から URL-encoded form data を生成します。

...されています。

@
param enum エンコードするデータ列([key, value] という形のデータの列)
@
param enc 指定された場合、パーセントエンコーディングする前に、このエンコーディングに変換
@
see URI.encode_www_form_component, URI.decode_www_form...

URI.encode_www_form_component(str, enc=nil) -> String (24.0)

文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。

...%83%B3%E3%82%B9%E3%83%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.decode(str) -> String (18.0)

URI 文字列をデコードした文字列を返します。

...scape,
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"

@
param str...

絞り込み条件を変える

URI.unescape(str) -> String (18.0)

URI 文字列をデコードした文字列を返します。

...scape,
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"

@
param str...