るりまサーチ

最速Rubyリファレンスマニュアル検索!
74件ヒット [1-74件を表示] (0.014秒)

別のキーワード

  1. tsort each_strongly_connected_component
  2. tsort each_strongly_connected_component_from
  3. uri component
  4. matrix component
  5. generic component

種類

ライブラリ

モジュール

検索結果

URI.decode(str) -> String (18119.0)

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

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

このメソッドは obsolete です。

代わりに
CGI.unescape,
URI.decode_www_form,
URI.decode_www_form_component
などの使用を検討してください。

例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/images?q=%A...

URI.decode_www_form_component(str, enc=Encoding::UTF_8) -> String (12238.0)

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

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

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

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

enc で指定したエンコーディングの文字...
...ist[][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.decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]] (6119.0)

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

...ます。
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。

require '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_www_form_component(str, enc=nil) -> String (6119.0)

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

...l5-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%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.unescape(str) -> String (3019.0)

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

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

このメソッドは obsolete です。

代わりに
CGI.unescape,
URI.decode_www_form,
URI.decode_www_form_component
などの使用を検討してください。

例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/images?q=%A...

絞り込み条件を変える

NEWS for Ruby 2.1.0 (24.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...追加: TSort#tsort
* 追加: TSort#tsort_each
* 追加: TSort#strongly_connected_components
* 追加: TSort#each_strongly_connected_component
* 追加: TSort#each_strongly_connected_component_from

* webrick
* レスポンスボディは readpartial や read をサポート...
...set
* 非互換: Set#to_set はコピーを生成して返す代わりに self を返すようになりました

* uri
* 非互換: URI.decode_www_form は現在の WHATWG による URL 標準に従います。
文字列エンコーディングを指定するために、エンコー...
...セントエンコードされた文字列を受け入れますが、セパレータにセミコロンは拒否します。
* 非互換: URI.decode_www_form は現在の WHATWG による URL 標準に従います。
パーセントエンコードする前に、エンコーディング引...

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

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

.../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...