Suppose I have a string s, which is basically a CSV, how can I get it as
array using fastercsv? Or any simple way?
···
--
Posted via http://www.ruby-forum.com/.
Suppose I have a string s, which is basically a CSV, how can I get it as
array using fastercsv? Or any simple way?
--
Posted via http://www.ruby-forum.com/.
How about looking at the documentation?
http://rdoc.info/stdlib/csv/CSV
robert
On Tue, Sep 4, 2012 at 3:25 PM, ajay paswan <lists@ruby-forum.com> wrote:
Suppose I have a string s, which is basically a CSV, how can I get it as
array using fastercsv? Or any simple way?
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
Robert Klemme wrote in post #1074649:
On Tue, Sep 4, 2012 at 3:25 PM, ajay paswan <lists@ruby-forum.com> > wrote:
Suppose I have a string s, which is basically a CSV, how can I get it as
array using fastercsv? Or any simple way?How about looking at the documentation?
http://rdoc.info/stdlib/csv/CSV
robert
I seriously went through that.. but may be I dont have patience or I am
not able to follow.. seriously I want to follow it.. give me any tips to
follow it nicely!
--
Posted via http://www.ruby-forum.com/\.
Please go through it once more. There's a section called "From a
String", with two subsections: "A line at a time", and "All at once"
with two ways of parsing a String that contains CSV. I think the one
you want is "All at once", which will return an array of arrays.
Jesus.
On Tue, Sep 4, 2012 at 7:31 PM, ajay paswan <lists@ruby-forum.com> wrote:
Robert Klemme wrote in post #1074649:
On Tue, Sep 4, 2012 at 3:25 PM, ajay paswan <lists@ruby-forum.com> >> wrote:
Suppose I have a string s, which is basically a CSV, how can I get it as
array using fastercsv? Or any simple way?How about looking at the documentation?
http://rdoc.info/stdlib/csv/CSV
robert
I seriously went through that.. but may be I dont have patience or I am
not able to follow.. seriously I want to follow it.. give me any tips to
follow it nicely!
Robert Klemme wrote in post #1074649:
Suppose I have a string s, which is basically a CSV, how can I get it as
array using fastercsv? Or any simple way?How about looking at the documentation?
I seriously went through that.. but may be I dont have patience or I am
not able to follow.. seriously I want to follow it..
If you do not have that much patience then programming is probably not for you.
give me any tips to follow it nicely!
I attribute your demanding style to you not being a native speaker of
English. Generally your chances of being heard are much better if you
sneak in a "please" in sentences like that.
The hint I'd give: read it carefully from top to bottom.
Good luck
robert
On Tue, Sep 4, 2012 at 7:31 PM, ajay paswan <lists@ruby-forum.com> wrote:
On Tue, Sep 4, 2012 at 3:25 PM, ajay paswan <lists@ruby-forum.com> >> wrote:
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
Robert Klemme wrote in post #1074753:
I attribute your demanding style to you not being a native speaker of
English. Generally your chances of being heard are much better if you
sneak in a "please" in sentences like that.
Thank you robert, I'll remember that, I hope I'll never make same
mistakes again. Thank you all for your valuable replies.
--
Posted via http://www.ruby-forum.com/\.
Oh, also, there's "Convert a Single Line" which has exactly what
you're looking for.