-------- Forwarded Message --------
> From: Yu Feng <[EMAIL PROTECTED]>
> To: Jürg Billeter <[EMAIL PROTECTED]>
> Subject: Re: [Vala] How to obtain number of elements in array
> Date: Wed, 30 Apr 2008 01:37:35 -0400
> 
> 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.
> 
> Yu


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

Yu



> On Sun, 2008-04-27 at 23:26 +0200, Jürg Billeter wrote:
> > Hi,
> > 
> > On Sun, 2008-04-27 at 23:16 +0200, Jaap A. Haitsma wrote:
> > > How do I obtain that the following string array has two elements
> > > 
> > >   const string[] x = {
> > >           "string1",
> > >           "string2"
> > >   };      
> > > [...]
> > > So something like
> > > 
> > > num = x.length();
> > 
> >     num = x.length;
> > 
> > should work fine.
> > 
> > Jürg
> > 
> > _______________________________________________
> > Vala-list mailing list
> > [email protected]
> > http://mail.gnome.org/mailman/listinfo/vala-list

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to