$95 GRAYBYTE WORDPRESS FILE MANAGER $32

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby34/share/gems/gems/csv-3.3.2/doc/csv/options/common/

HOME
Current File : /opt/alt/ruby34/share/gems/gems/csv-3.3.2/doc/csv/options/common//quote_char.rdoc
====== Option +quote_char+

Specifies the character (\String of length 1) used used to quote fields
in both parsing and generating.
This String will be transcoded into the data's \Encoding before use.

Default value:
  CSV::DEFAULT_OPTIONS.fetch(:quote_char) # => "\"" (double quote)

This is useful for an application that incorrectly uses <tt>'</tt> (single-quote)
to quote fields, instead of the correct <tt>"</tt> (double-quote).

Using the default (double quote):
  str = CSV.generate do |csv|
    csv << ['foo', 0]
    csv << ["'bar'", 1]
    csv << ['"baz"', 2]
  end
  str # => "foo,0\n'bar',1\n\"\"\"baz\"\"\",2\n"
  ary = CSV.parse(str)
  ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]]

Using <tt>'</tt> (single-quote):
  quote_char = "'"
  str = CSV.generate(quote_char: quote_char) do |csv|
    csv << ['foo', 0]
    csv << ["'bar'", 1]
    csv << ['"baz"', 2]
  end
  str # => "foo,0\n'''bar''',1\n\"baz\",2\n"
  ary = CSV.parse(str, quote_char: quote_char)
  ary # => [["foo", "0"], ["'bar'", "1"], ["\"baz\"", "2"]]

---

Raises an exception if the \String length is greater than 1:
  # Raises ArgumentError (:quote_char has to be nil or a single character String)
  CSV.new('', quote_char: 'xx')

Raises an exception if the value is not a \String:
  # Raises ArgumentError (:quote_char has to be nil or a single character String)
  CSV.new('', quote_char: :foo)


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
27 Jan 2026 4.00 PM
root / linksafe
0755
col_sep.rdoc
1.427 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
quote_char.rdoc
1.356 KB
27 Jan 2026 4.00 PM
root / linksafe
0644
row_sep.rdoc
2.723 KB
27 Jan 2026 4.00 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF