aboutsummaryrefslogtreecommitdiffstats
path: root/doc/csv/strip.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/csv/strip.rdoc')
-rw-r--r--doc/csv/strip.rdoc15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/csv/strip.rdoc b/doc/csv/strip.rdoc
new file mode 100644
index 0000000000..56ae4310c3
--- /dev/null
+++ b/doc/csv/strip.rdoc
@@ -0,0 +1,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"]