るりまサーチ

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

別のキーワード

  1. stringio ungetbyte
  2. io ungetbyte
  3. _builtin ungetbyte
  4. ungetbyte stringio
  5. ungetbyte io

ライブラリ

クラス

検索結果

IO#ungetbyte(c) -> nil (18108.0)

指定したバイト列を書き戻します。

...し(IO#sysread など)
には影響しません。

@param c バイト列(文字列)、もしくは0から255までの整数

例:

f = File.new("testfile") #=> #<File:testfile>
b = f.getbyte #=> 0x38
f.ungetbyte(b) #=> nil
f.getbyte #=> 0x38...

StringIO#ungetbyte(char) -> nil (18108.0)

指定された char を読み戻します。

...指定された char を読み戻します。

2バイト以上の読み戻しは保証されません。

@param char 読み戻したい1文字かそのコードポイントを指定します。

@see IO#ungetbyte...