Parsing a string



All:

I am trying to parse the following line:

 -rwxr-xr-x    1 nhodge   nhodge    4724464 Oct 31 18:36 Shakira -
Laundry Service - 03 - Whenever, Wherever.mp3

I need to grab the first char (-, d, or l), the size, and the file
name.  I am trying to do this using g_strsplit et. al., but I can't
quite get it to work.  My primary problems:

* The variable number of spaces between the fields.

* The fact that the file name can also have spaces.

Any ideas?  Thanks.

Neil





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