るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
9件ヒット [1-9件を表示] (0.077秒)
トップページ > クエリ:String[x] > バージョン:2.4.0[x] > クエリ:h[x] > クエリ:code[x]

別のキーワード

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

ライブラリ

クラス

モジュール

キーワード

検索結果

String#each_codepoint {|codepoint| block } -> self (99919.0)

文字列の各コードポイントに対して繰り返します。

文字列の各コードポイントに対して繰り返します。

UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE) 以外のエンコーディングに対しては
各文字のバイナリ表現由来の値になります。

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 1...

String#each_codepoint -> Enumerator (99619.0)

文字列の各コードポイントに対して繰り返します。

文字列の各コードポイントに対して繰り返します。

UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE) 以外のエンコーディングに対しては
各文字のバイナリ表現由来の値になります。

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 1...

Net::HTTPResponse#code -> String (63625.0)

HTTP のリザルトコードです。例えば '302' などです。

HTTP のリザルトコードです。例えば '302' などです。

この値を見ることでレスポンスの種類を判別できますが、
レスポンスオブジェクトがどのクラスのインスタンスかを
見ることでもレスポンスの種類を判別できます。

//emlist[例][ruby]{
require 'net/http'

uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.code # => "200"
//}

Digest.#hexencode(string) -> String (37273.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("\xB0") # => "b0"

p digest = Digest::MD5.digest("ruby") # => "...

StringIO#each_codepoint {|codepoint| ... } -> self (36901.0)

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

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

@see IO#each_codepoint

絞り込み条件を変える

StringIO#each_codepoint -> Enumerator (36601.0)

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

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

@see IO#each_codepoint

WEBrick::HTTPStatus.#reason_phrase(code) -> String (18925.0)

指定された整数が表すステータスコードに対応する reason phrase を表す文字列を返します。

指定された整数が表すステータスコードに対応する reason phrase
を表す文字列を返します。

@param code HTTP のステータスコードを表す整数か文字列を指定します。

require 'webrick'
p WEBrick::HTTPStatus.reason_phrase(304) #=> "Not Modified"

CGI::HtmlExtension#form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded") -> String (10027.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param method method 属性の値として "get" か "post" を指定します。

@param action action 属性の値を指定します。デフォルトは現在の CGI スクリプト名です。

@param enctype enctype 属性の値を指定します。デフォルトは "application/x-www-form-urlencoded" です。

例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="app...

CGI::HtmlExtension#form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded") { ... } -> String (10027.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param method method 属性の値として "get" か "post" を指定します。

@param action action 属性の値を指定します。デフォルトは現在の CGI スクリプト名です。

@param enctype enctype 属性の値を指定します。デフォルトは "application/x-www-form-urlencoded" です。

例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="app...