るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. socket int
  2. prime int_from_prime_division
  3. _builtin to_int
  4. mkmf convertible_int
  5. option int

ライブラリ

クラス

モジュール

キーワード

検索結果

String#bytes -> [Integer] (54646.0)

文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)

文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)

//emlist[例][ruby]{
"str".bytes # => [115, 116, 114]
//}

ブロックが指定された場合は String#each_byte と同じように動作します。

Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。

@see String#each_byte

Net::POP3#n_bytes -> Integer (18679.0)

サーバにあるメールの総バイト数を返します。

サーバにあるメールの総バイト数を返します。

@see Net::POP3#n_mails
@raise TimeoutError 接続がタイムアウトした場合に発生します
@raise Net::POPError サーバがエラーを報告した場合に発生します
@raise Net::POPBadResponse サーバからの応答がプロトコル上不正であった場合に発生します

String#bytesize -> Integer (18622.0)

文字列のバイト長を整数で返します。

文字列のバイト長を整数で返します。

//emlist[例][ruby]{
#coding:UTF-8
# 実行結果は文字コードによって異なります。
p "いろは".size #=> 3
p "いろは".bytesize #=> 9
//}

@see String#size

Net::POP3#n_mails -> Integer (394.0)

サーバにあるメールの数を返します。

サーバにあるメールの数を返します。

@see Net::POP3#n_bytes
@raise TimeoutError 接続がタイムアウトした場合に発生します
@raise Net::POPError サーバがエラーを報告した場合に発生します
@raise Net::POPBadResponse サーバからの応答がプロトコル上不正であった場合に発生します

Net::HTTPHeader#range_length -> Integer|nil (340.0)

Content-Range: ヘッダフィールドの表している長さを整数で返します。

Content-Range: ヘッダフィールドの表している長さを整数で返します。

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である場合に
発生します。


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

uri = UR...

絞り込み条件を変える

String#getbyte(index) -> Integer | nil (340.0)

index バイト目のバイトを整数で返します。

index バイト目のバイトを整数で返します。

index に負を指定すると末尾から数えた位置のバイト
を取り出します。
範囲外を指定した場合は nil を返します。

@param index バイトを取り出す位置

//emlist[例][ruby]{
s = "tester"
s.bytes # => [116, 101, 115, 116, 101, 114]
s.getbyte(0) # => 116
s.getbyte(1) # => 101
s.getbyte(-1) # => 114
s.getbyte(6) ...