るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.036秒)
トップページ > クエリ:@[x] > クエリ:ungetbyte[x]

別のキーワード

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

ライブラリ

クラス

検索結果

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

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

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

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

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

@
see IO#ungetbyte...

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

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

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

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

例:

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