るりまサーチ

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

別のキーワード

  1. kernel $input_record_separator
  2. kernel $output_record_separator
  3. english $input_record_separator
  4. context record_location
  5. english $output_record_separator

ライブラリ

クラス

モジュール

キーワード

検索結果

Shell#record_separator -> String (18201.0)

@todo

@todo

Kernel$$INPUT_RECORD_SEPARATOR -> String | nil (12307.0)

$/ の別名

...$/ の別名

require "English"

$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]

__END__
ugo|ego|fogo...

Shell.default_record_separator -> String (6202.0)

執筆者募集

執筆者募集

Shell で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。

@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定します。

Kernel$$RS -> String | nil (6107.0)

$/ の別名

...$/ の別名

require "English"

$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]

__END__
ugo|ego|fogo...

Kernel$$OUTPUT_RECORD_SEPARATOR -> String | nil (3207.0)

$\ の別名

...$\ の別名

require "English"

print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb

ruby sample.rb
hoge
huga
fuge
ugo...

絞り込み条件を変える

Shell::Filter#each(rs = nil) -> () (3106.0)

フィルタの一行ずつをblockに渡します。

...行ずつをblockに渡します。

@param rs レコードセパレーターを表す文字列を指定します。
nil ならば、Shell.record_separatorの値が使用されます。

使用例
require 'shell'
sh = Shell.new
sh.cat("/etc/passwd").each { |line|
puts line
}...

Kernel$$ORS -> String | nil (107.0)

$\ の別名

...$\ の別名

require "English"

print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb

ruby sample.rb
hoge
huga
fuge
ugo...

CSV.new(data, options = Hash.new) -> CSV (106.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...このメソッドは CSV ファイルを読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。

ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用し...
...した StringIO を渡してください。

@param data String か IO のインスタンスを指定します。
String のインスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。

@param options CSV を...
...even if it occurs in a quoted field, assuming that you
would have the same line endings there. If none of those sequences is
found, +data+ is ARGF, Object::STDIN, Object::STDOUT, or
Object::STDERR, or the stream is only available for output, the default
$INPUT_RECORD_SEPARATOR ($/) is us...