Re: [Vala] [Fwd: Re: How to obtain number of elements in array]



On Wed, 2008-04-30 at 01:38 -0400, Yu Feng wrote:
Not always.

If the string is created by:
string s = "a|b|c";
string[] x = s.split("|");

we will always have x.length == -1.

Don't know how to deal with it then. expose a static method in string
class? 
There seems to be no explicit place to put the g_strv_length call
cleanly in the code generator, because in the compiler string is a
ordinary class and string[] is a ordinary array.

The idea is to add an attribute to the split method to mark the
resulting array as NULL-terminated. Vala can then implicitly call
g_strv_length right after calling the split method and set the length
variable accordingly. See also
http://bugzilla.gnome.org/show_bug.cgi?id=514186

I am also wondering why evolution always reply the email to the sender
instead of the maillist.

Just use reply to all (or reply to list).

Juerg




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