るりまサーチ

最速Rubyリファレンスマニュアル検索!
206件ヒット [201-206件を表示] (0.024秒)
トップページ > クラス:String[x] > ライブラリ:ビルトイン[x] > クエリ:bytes[x]

別のキーワード

  1. _builtin bytes
  2. stringio bytes
  3. string bytes
  4. securerandom random_bytes
  5. random bytes

キーワード

検索結果

<< < 1 2 3 >>

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

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)...

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

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 # => "stringXXXYYYA"
//}...

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

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 # => "stringXXXYYYA"
//}...
<< < 1 2 3 >>