On Tue, Jan 25, 2011 at 8:39 AM, Juergen <j...@gmx.de> wrote:
> Hi,
>
> I am wondering if there is some kind of string.starts_with method in
> vala.
> I try to avoid a memory-allocating algorithm like
>
>        if ("Hello World"[0:5] == "Hello")
>
> but do not know how to implement this without a starts_with method.

Have you seen the has_prefix method?
http://valadoc.org/glib-2.0/string.has_prefix.html

Regards,
Alex
_______________________________________________
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to