22件ヒット
[1-22件を表示]
(0.073秒)
検索結果
-
CSV
. new(data , options = Hash . new) -> CSV (131.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...区切り文字列を指定します。この文字列はパースする前にデータの
エンコーディングに変換されます。
: :row_sep
行区切りの文字列を指定します。:auto という特別な値をセットすることができます。
:auto を指定した場合......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
problems with resetting the document position to where it was before the
read ahead. This String will be transcode......が一つだけ
の場合は配列に格納する必要はありません。
全ての組み込みの変換器は、値を変換する前に UTF-8 にエンコーディング変
換を試みます。エンコーディング変換に失敗した場合はフィールドは変換さ
れませ... -
CSV
. generate _ line(row , options = Hash . new) -> String (107.0) -
このメソッドは一つの Array オブジェクトを CSV 文字列に変換するためのショートカットです。 複数行のCSVを扱う際はCSV#<<を使うとより高速です。
...:encoding というキーを使用すると出力のエンコーディングを指定することができます。
:row_sep というキーの値には $/ がセットされます。
//emlist[例][ruby]{
require "csv"
taro = ['1', 'taro', 'tanaka', '20']
CSV.generate...