- すべて(1)
- 3.4(1)
1件ヒット
[1-1件を表示]
(0.321秒)
ライブラリ
- ビルトイン (1)
検索結果
-
String
# append _ as _ bytes(*objects) -> self (45251.0) -
引数で与えたオブジェクトをバイト列として、self に破壊的に連結します。
...ist[例][ruby]{
s = "あ".b # => "\xE3\x81\x82"
s.encoding # => #<Encoding:BINARY (ASCII-8BIT)>
s.append_as_bytes("い") # => "\xE3\x81\x82\xE3\x81\x84"
# s << "い" では連結できない
s << "い" # => "incompatible character encodings: BINARY (ASCII-8BIT) and U......TF-8 (Encoding::CompatibilityError)
//}
//emlist[引数で整数を渡す例][ruby]{
t = ""
t.append_as_bytes(0x61) # => "a"
t.append_as_bytes(0x3062) # => "ab"
//}
@see String#<<, String#concat...