るりまサーチ

最速Rubyリファレンスマニュアル検索!
66件ヒット [1-66件を表示] (0.034秒)
トップページ > クラス:ARGF.class[x] > クエリ:Kernel.#gets[x]

別のキーワード

  1. kernel exec
  2. kernel spawn
  3. kernel system
  4. kernel open
  5. kernel gsub

ライブラリ

キーワード

検索結果

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

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

...GF.gets # => "line1\n"

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

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.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 (18152.0)

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

...GF.gets # => "line1\n"

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

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.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 (18152.0)

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

...GF.gets # => "line1\n"

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

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.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 (18152.0)

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

...GF.gets # => "line1\n"

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

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.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 (18152.0)

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

...GF.gets # => "line1\n"

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

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.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 (18152.0)

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

...GF.gets # => "line1\n"

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

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.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#readline(limit) -> String (13.0)

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

...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。

@param limit 最大の読み込みバイト数

@raise EOFError EOFに達したら発生する

@see Kernel.#readline, ARGF.class#gets...

ARGF.class#readline(rs = $/) -> String (13.0)

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

...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。

@param limit 最大の読み込みバイト数

@raise EOFError EOFに達したら発生する

@see Kernel.#readline, ARGF.class#gets...

ARGF.class#readline(rs, limit) -> String (13.0)

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

...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。

@param limit 最大の読み込みバイト数

@raise EOFError EOFに達したら発生する

@see Kernel.#readline, ARGF.class#gets...