るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

ライブラリ

クラス

キーワード

検索結果

IO#getbyte -> Integer | nil (39129.0)

IO から1バイトを読み込み整数として返します。 既に EOF に達していれば nil を返します。

...
IO
から1バイトを読み込み整数として返します。
既に EOF に達していれば nil を返します。

f = File.new("testfile")
f.getbyte #=> 84
f.getbyte #=> 104...

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

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

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

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

例:

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

StringIO#getbyte -> Integer | nil (21119.0)

自身から 1 文字読み込んで、その文字に対応する Fixnum を返します。 文字列の終端に到達した時には nil を返します。

...字列の終端に到達した時には nil を返します。

@raise IOError 自身が読み取り不可なら発生します。

//emlist[例][ruby]{
require "stringio"
a = StringIO.new("ho")
a.getbyte #=> 104
a.getbyte #=> 111
a.getbyte #=> nil
//}...

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

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

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

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

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

@see IO#ungetbyte...

ruby 1.8.2 feature (24.0)

ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。

...トフォームの追加

== 1.8.1 (2003-12-25) -> 1.8.2 (2004-12-25)

* cgi/session においてクライアントからセッション ID を指定できてしまうバグが
修正されました。
* cgi/session においてセッション情報を保存するファイル名にセッション...
...12-17
: CGI::Session#initialize [lib] [compat]
'no_hidden' オプションを指定できるようになりました。((<ruby-talk:123850>))

=== 2004-12-16

: Hash#eql? [ruby] [obsolete]
: Hash#hash [ruby] [obsolete]

削除
((<ruby-dev:25206>))?

=== 2004-12-14
: CGI::Session.initialize [li...
...Scanner#clear [lib] [obsolete]
$VERVOSE が設定されている時に警告がでるようになりました。use #terminate.
: StringScanner#getbyte [lib] [obsolete]
$VERVOSE が設定されている時に警告がでるようになりました。use #get_byte.
: StringScanner#restsize [lib...

絞り込み条件を変える

ARGF.class#gets(limit) -> String | nil (12.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...est.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(limit, chomp: false) -> String | nil (12.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...est.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(rs = $/) -> String | nil (12.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...est.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(rs = $/, chomp: false) -> String | nil (12.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...est.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(rs, limit) -> String | nil (12.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...est.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

絞り込み条件を変える

ARGF.class#gets(rs, limit, chomp: false) -> String | nil (12.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...est.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...