1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/doc/csv/options/parsing/strip.rdoc

15 lines
363 B
Text

====== 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"]