Re: csv (comma separated value) file



Tristan Van Berkom ha scritto:
On Mon, Aug 3, 2009 at 12:03 PM, Andrea Zagli<azagli inwind it> wrote:
i didn't find nothing about to manage (read/write) csv files with glib

do you know about something that i didn't find?


Currently its pretty easy using g_file_get_contents()/g_strsplit() if you
can have it all in ram, or using GIO and again, g_strsplit() on a per line
basis if you need to stream it.

Cheers,
         -Tristan
it's not so easy, for example the following csv file:

"a;b";c

has only two columns, you cannot handle this case with a simple g_strsplit call

- Paolo





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]