るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.128秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > クエリ:string[x] > クエリ:parse[x] > クラス:CSV[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

検索結果

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

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

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

ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用して...
...r the closing quote
for a field. (In truth, it reads to the first line ending beyond this
size.) If a quote cannot be found within the limit CSV will raise a
MalformedCSVError, assuming the data is faulty. You can use this limit to
prevent what are effectively DoS attacks on the parse...
...ise CSV::MalformedCSVError 不正な CSV をパースしようとしたときに発生します。

//emlist[例: ファイルの読み込み][ruby]{
require "csv"

users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write("test.csv",...