3件ヒット
[1-3件を表示]
(0.092秒)
検索結果
先頭3件
-
CSV
# row _ sep -> String (54361.0) -
行区切り文字列として使用する文字列を返します。
行区切り文字列として使用する文字列を返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2|row1_1,row1_2", row_sep: "|")
csv.row_sep # => "|"
csv.read # => [["header1", "header2"], ["row1_1", "row1_2"]]
//}
@see CSV.new -
Array
# to _ csv(**options) -> String (58.0) -
CSV.generate_line(self, options) と同様です。
CSV.generate_line(self, options) と同様です。
Array オブジェクトを 1 行の CSV 文字列に変換するためのショートカットです。
@param options CSV.generate_line と同様のオプションを指定します。
//emlist[][ruby]{
require 'csv'
p [1, 'Matz', :Ruby, Date.new(1965, 4, 14)].to_csv # => "1,Matz,Ruby,1965-04-14\n"
p [1, 'Matz',... -
String
# parse _ csv(**options) -> [String] (58.0) -
CSV.parse_line(self, options) と同様です。
CSV.parse_line(self, options) と同様です。
1 行の CSV 文字列を、文字列の配列に変換するためのショートカットです。
@param options CSV.new と同様のオプションを指定します。
//emlist[][ruby]{
require "csv"
p "Matz,Ruby\n".parse_csv # => ["Matz", "Ruby"]
p "Matz|Ruby\r\n".parse_csv(col_sep: '|', row_sep: "\r\n") # => ...