Re: [Vala] string starts_with
- From: Alexander Krivács Schrøder <alexschrod gmail com>
- To: Vala ML <vala-list gnome org>
- Subject: Re: [Vala] string starts_with
- Date: Tue, 25 Jan 2011 08:57:21 +0100
On Tue, Jan 25, 2011 at 8:39 AM, Juergen <jota 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]