Re: [Vala] triming



On Fri, Apr 13, 2012 at 12:29 PM, Mic <mictadlo gmail com> wrote:

Hello,
How to split strings and remove '\n' and spaces? In python I did it in the
following way:

   for line in f:
       try:
           parts = [part.strip() for part in line.split(',')]
       except IndexError:
           continue

Thank you in advance.


http://valadoc.org/#!api=glib-2.0/string.strip
http://valadoc.org/#!api=glib-2.0/string.split

-- 
www.debian.org - The Universal Operating System


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