End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
CSV::Parser#strip_value
strip_value(value)
lib/csv/parser.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/csv/parser.rb, line 1069
def strip_value(value)
return value unless @strip
return nil if value.nil?
case @strip
when String
size = value.size
while value.start_with?(@strip)
size -= 1
value = value[1, size]
end
while value.end_with?(@strip)
size -= 1
value = value[0, size]
end
else
value.strip!
end
value
end
No documentation available