るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. range end

ライブラリ

検索結果

String#append_as_bytes(*objects) -> self (12221.0)

引数で与えたオブジェクトをバイト列として、self に破壊的に連結します。

...SCII-8BIT)>
s.append_as_bytes("い") # => "\xE3\x81\x82\xE3\x81\x84"

# s << "い" では連結できない
s << "い" # => "incompatible character encodings: BINARY (ASCII-8BIT) and UTF-8 (Encoding::CompatibilityError)
//}

//emlist[引数で整数を渡す例][ruby]{
t = ""
t.append_as_bytes(0x6...
...1) # => "a"
t.append_as_bytes(0x3062) # => "ab"
//}

@see String#<<, String#concat...