Re: [Vala] Is this a bug in VALA ?
- From: Frederik <scumm_fredo gmx net>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Is this a bug in VALA ?
- Date: Sun, 06 Sep 2009 17:22:35 +0200
Hi,
you might want to use one of these functions:
http://references.valadoc.org/glib-2.0/string.split.html
http://references.valadoc.org/glib-2.0/string.split_set.html
For example:
void main () {
string line = "happy doggy";
string[] tokens = line.split (" ");
assert (tokens.length >= 2);
string col1 = tokens[0];
string col2 = tokens[1];
stdout.printf ("col1: %s, col2: %s\n", col1, col2);
}
Best regards,
Frederik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]