73件ヒット
[1-73件を表示]
(0.050秒)
別のキーワード
種類
- 変数 (44)
- 特異メソッド (17)
- インスタンスメソッド (12)
ライブラリ
- English (44)
- csv (11)
- shell (12)
-
shell
/ filter (6)
クラス
- CSV (11)
- Shell (12)
-
Shell
:: Filter (6)
モジュール
- Kernel (44)
キーワード
-
$ INPUT _ RECORD _ SEPARATOR (11) -
$ ORS (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
$ RS (11) -
default
_ record _ separator (6) - each (6)
- new (11)
検索結果
先頭5件
-
Shell
# record _ separator -> String (18201.0) -
@todo
@todo -
Kernel
$ $ INPUT _ RECORD _ SEPARATOR -> String | nil (6207.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
$ $ 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... -
Kernel
$ $ RS -> String | nil (3107.0) -
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo... -
CSV
. new(data , options = Hash . new) -> CSV (124.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...for output, the default
$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
note that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-ending translation can cause
pro......が一つだけ
の場合は配列に格納する必要はありません。
全ての組み込みの変換器は、値を変換する前に UTF-8 にエンコーディング変
換を試みます。エンコーディング変換に失敗した場合はフィールドは変換さ
れませ......ョンに似ていますが、ヘッダ専用の変換器を定義します。
全ての組み込みの変換器は、値を変換する前に UTF-8 にエンコーディング変
換を試みます。エンコーディング変換に失敗した場合はヘッダは変換されま
せん。
:... -
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... -
Shell
:: Filter # each(rs = nil) -> () (106.0) -
フィルタの一行ずつをblockに渡します。
...行ずつをblockに渡します。
@param rs レコードセパレーターを表す文字列を指定します。
nil ならば、Shell.record_separatorの値が使用されます。
使用例
require 'shell'
sh = Shell.new
sh.cat("/etc/passwd").each { |line|
puts line
}...