るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice
  3. string []
  4. string slice!
  5. string gsub

検索結果

<< < 1 2 3 4 5 ... > >>

StringIO#each_codepoint -> Enumerator (9100.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

Digest.#hexencode(string) -> String (6324.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("\xB...
....hexencode(digest) # => "58e53d1324eef6265fdb97b08ed9aadf"
p Digest::MD5.hexdigest("ruby") # => "58e53d1324eef6265fdb97b08ed9aadf"

p digest = Digest::SHA1.digest("ruby") # => "\x18\xE4\x0E\x14\x01\xEE\xF6~\x1A\xE6\x9E\xFA\xB0\x9A\xFBq\xF8\x7F\xFB\x81"
p Digest.hexencode(diges...

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

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

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

application/x-www-form-urlencoded 形式のデータをデコードし、
[key, value] という形の配列の配列を返します。

enc で指定したエンコーディングの文字列が URL エンコードされたもの...
...ドは
https://url.spec.whatwg.org/#concept-urlencoded-parser
にもとづいて実装されています。
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。

require 'uri'
ary = URI.decode_www_form("a=1&a=2&b=3")
p ary...
...y.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...

Net::FTP#last_response_code -> String (6203.0)

サーバからの最後の応答のコードを文字列で返します。

サーバからの最後の応答のコードを文字列で返します。

例えばログイン(Net::FTP#login)に成功した場合には
"230" を返します。

数字の意味は 959 参照してください。

@see Net::FTP#last_response

Net::FTP#return_code -> String (6202.0)

このメソッドは obsolete です。使わないでください。

このメソッドは obsolete です。使わないでください。

"\n" を返します。

絞り込み条件を変える

Net::FTP#return_code=(string) (6202.0)

このメソッドは obsolete です。使わないでください。

このメソッドは obsolete です。使わないでください。

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

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

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

このメソッドは obsolete です。

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

例:
require 'uri'
puts URI.unescape('http://images.google.co.jp/i...

URI.encode(str, unsafe = URI::UNSAFE) -> String (6202.0)

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

...I 文字列をエンコードした文字列を返します。

このメソッドは obsolete です。

代わりに
ERB::Util.#url_encode,
CGI.escape,
URI.encode_www_form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は...

Base64.#decode64(str) -> String (6201.0)

与えられた文字列を Base64 デコードしたデータを返します。

...文字列を指定します。

require 'base64'
str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' +
'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' +
'ZSB0aHJlZQpBbmQgc28gb24uLi4K'
puts Base64.decode64(str)

# This is line one
# This is line two
# This is line three
# And so on......

Base64.#encode64(bin) -> String (6201.0)

与えられたデータを Base64 エンコードした文字列を返します。

...字ごとに改行を追加します。

@param bin Base64 エンコードするデータを指定します。


require 'base64'
Base64.encode64("Now is the time for all good coders\nto learn Ruby")

# => Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
# UnVieQ==...

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>