るりまサーチ (Ruby 3.0)

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer digits
  5. integer chr

ライブラリ

キーワード

検索結果

Integer#chr(encoding) -> String (63517.0)

self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。

self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。

//emlist[][ruby]{
p 65.chr
# => "A"
p 12354.chr
# => `chr': 12354 out of char range (RangeError)

p 12354.chr(Encoding::UTF_8)
# => "あ"
p 12354.chr(Encoding::EUC_JP)
# => RangeError: invalid codepoint 0x3042 in EUC-JP
//}

引数無しで呼ばれた場合は self ...

Integer#chr -> String (63217.0)

self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。

self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。

//emlist[][ruby]{
p 65.chr
# => "A"
p 12354.chr
# => `chr': 12354 out of char range (RangeError)

p 12354.chr(Encoding::UTF_8)
# => "あ"
p 12354.chr(Encoding::EUC_JP)
# => RangeError: invalid codepoint 0x3042 in EUC-JP
//}

引数無しで呼ばれた場合は self ...

Psych::Nodes::Stream#encoding -> Integer (54628.0)

stream に使われるエンコーディングを返します。

stream に使われるエンコーディングを返します。

@see Psych::Nodes::Stream#encoding=

Encoding::Converter#primitive_convert(source_buffer, destination_buffer) -> Symbol (9148.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) -> Symbol (9148.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) -> Symbol (9148.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 (9148.0)

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

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

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

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

Array#pack(template) -> String (130.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...# NaN
[1.0/0.0].pack("f") # => "\x7F\x80\x00\x00" # +Infinity
[-1.0/0.0].pack("f") # => "\xFF\x80\x00\x00" # -Infinity
//}

VAX (NetBSD 3.0) (非IEEE754):
//emlist[][ruby]{
[1.0].pack("f") # => "\x80@\x00\x00"
//}

: d

倍精度浮動小数点数(機種依存)

x86_64 (IEEE754 倍...
..."\x7F\xF0\x00\x00\x00\x00\x00\x00" # +Infinity
[-1.0/0.0].pack("d") # => "\xFF\xF0\x00\x00\x00\x00\x00\x00" # -Infinity
//}

VAX (NetBSD 3.0) (非IEEE754):
//emlist[][ruby]{
[1.0].pack("d") # => "\x80@\x00\x00\x00\x00\x00\x00"
//}

: e

リトルエンディアンの単精度浮動小...

Array#pack(template, buffer: String.new) -> String (130.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...# NaN
[1.0/0.0].pack("f") # => "\x7F\x80\x00\x00" # +Infinity
[-1.0/0.0].pack("f") # => "\xFF\x80\x00\x00" # -Infinity
//}

VAX (NetBSD 3.0) (非IEEE754):
//emlist[][ruby]{
[1.0].pack("f") # => "\x80@\x00\x00"
//}

: d

倍精度浮動小数点数(機種依存)

x86_64 (IEEE754 倍...
..."\x7F\xF0\x00\x00\x00\x00\x00\x00" # +Infinity
[-1.0/0.0].pack("d") # => "\xFF\xF0\x00\x00\x00\x00\x00\x00" # -Infinity
//}

VAX (NetBSD 3.0) (非IEEE754):
//emlist[][ruby]{
[1.0].pack("d") # => "\x80@\x00\x00\x00\x00\x00\x00"
//}

: e

リトルエンディアンの単精度浮動小...

String#unpack(template) -> Array (130.0)

Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。

...# NaN
[1.0/0.0].pack("f") # => "\x7F\x80\x00\x00" # +Infinity
[-1.0/0.0].pack("f") # => "\xFF\x80\x00\x00" # -Infinity
//}

VAX (NetBSD 3.0) (非IEEE754):
//emlist[][ruby]{
[1.0].pack("f") # => "\x80@\x00\x00"
//}

: d

倍精度浮動小数点数(機種依存)

x86_64 (IEEE754 倍...
..."\x7F\xF0\x00\x00\x00\x00\x00\x00" # +Infinity
[-1.0/0.0].pack("d") # => "\xFF\xF0\x00\x00\x00\x00\x00\x00" # -Infinity
//}

VAX (NetBSD 3.0) (非IEEE754):
//emlist[][ruby]{
[1.0].pack("d") # => "\x80@\x00\x00\x00\x00\x00\x00"
//}

: e

リトルエンディアンの単精度浮動小...

絞り込み条件を変える

String#<<(other) -> self (58.0)

self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

self に文字列 other を破壊的に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

self を返します。

@param other 文字列もしくは 0 以上の整数

//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"

str << "YYY"
p str # => "stringXXXYYY"

str << 65 # 文字AのASCIIコード
p str # => "stri...

String#concat(other) -> self (58.0)

self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

self に文字列 other を破壊的に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。

self を返します。

@param other 文字列もしくは 0 以上の整数

//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"

str << "YYY"
p str # => "stringXXXYYY"

str << 65 # 文字AのASCIIコード
p str # => "stri...

String#concat(*arguments) -> self (43.0)

self に複数の文字列を破壊的に連結します。

self に複数の文字列を破壊的に連結します。

引数の値が整数である場合は Integer#chr の結果に相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。

self を返します。

@param arguments 複数の文字列もしくは 0 以上の整数

//emlist[例][ruby]{
str = "foo"
str.concat
p str # => "foo"

str = "foo"
str.concat "bar", "baz"
p str # => "foobarbaz"

str = "foo"
str....