G
Grace Xue
Hi, does anyone know of a good way to remove leading and trailing quotes
(") in a string please?
Thanks
Grace
(") in a string please?
Thanks
Grace
Grace said:Hi, does anyone know of a good way to remove leading and trailing quotes
(") in a string please?
Hi, does anyone know of a good way to remove leading and trailing quotes
(") in a string please?
Grace said:Thanks for all that everyone. I'm a bit lost after a whole afternoon of
trail and error. What I'm trying to do is read a csv. file that has
different rows and multiple coloumns. The way it's currently done is
putting each row into an array, and retrieve each column using the
element number.
For example, a file with a line like this (CSV)
16/08/07,working hard
My codes are like this:
for row in csv_rows
begin
parsed[]
CSV.parse_row(row, 0, parsed)
date_string = parsed[0] => 16/08/07
description = parsed[1] => working hard
end
The problem I have is some file come in as
"16/08/07,working hard"
I have a feeling that I need to remove the quotes before the
CSV.parse_row line. But how?
Thanks
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.