File: strip.rdoc

package info (click to toggle)
ruby-csv 3.3.5-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 796 kB
  • sloc: ruby: 6,862; makefile: 4; sh: 4
file content (15 lines) | stat: -rw-r--r-- 363 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
====== Option +strip+

Specifies the boolean value that determines whether
whitespace is stripped from each input field.

Default value:
  CSV::DEFAULT_OPTIONS.fetch(:strip) # => false

With default value +false+:
  ary = CSV.parse_line(' a , b ')
  ary # => [" a ", " b "]

With value +true+:
  ary = CSV.parse_line(' a , b ', strip: true)
  ary # => ["a", "b"]