るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer times
  5. integer upto

検索結果

String#bytes -> [Integer] (54631.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

String#bytes {|byte| ... } -> self (54331.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

OpenSSL::BN#num_bytes -> Integer (18700.0)

自身を表現するのに使っているバイト数を返します。

自身を表現するのに使っているバイト数を返します。

//emlist[][ruby]{
require 'openssl'

p 0.to_bn.num_bytes # => 0
p 255.to_bn.num_bytes # => 1
p 256.to_bn.num_bytes # => 2

p 0b111_11111.to_bn.num_bytes # => 1
p 0b1000_00000.to_bn.num_bytes # => 2
//}

Gem::Package::TarReader::Entry#bytes_read -> Integer (18610.0)

自身から読み込んだバイト数を返します。

自身から読み込んだバイト数を返します。

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

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

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

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

絞り込み条件を変える

String#bytesize -> Integer (18607.0)

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

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

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

@see String#size

WIN32OLE_VARIANT#vartype -> Integer (343.0)

selfの型情報を取得します。

selfの型情報を取得します。

型情報は、WIN32OLE::VARIANTの定数値の組み合わせです。

obj = WIN32OLE_VARIANT.new("string")
obj.vartype # => 8 (WIN32OLE::VARIANT::VT_BSTR)
bytes = WIN32OLE_VARIANT.new([1,2,3,4,5], VT_UI1 | VT_ARRAY)
bytes.vartype # => 8209 (WIN32OLE::VARIANT::VT_ARRAY | VT_UI1)

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

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

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

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

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


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

uri = UR...

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

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

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

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

String#getbyte(index) -> Integer | nil (325.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) ...

絞り込み条件を変える

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> Symbol (322.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, options) -> Symbol (322.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@...