From: Zeeshan Ali (Khattak) Date: Mon, 9 Mar 2009 14:52:07 +0000 (+0200) Subject: glib-2.0: Add string.to_bool() X-Git-Tag: 0.6.0~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66d126e6bebca5cb6ea286979764b3ce15da24a7;p=thirdparty%2Fvala.git glib-2.0: Add string.to_bool() --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 34da3ee6b..66493fa53 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -888,6 +888,14 @@ public class string { public ulong to_ulong (out weak string endptr = null, int _base = 0); [CCode (cname = "g_ascii_strtoll")] public int64 to_int64 (out weak string endptr = null, int _base = 0); + public bool to_bool () { + if (this == "true") { + return true; + } else { + return false; + } + } + [CCode (cname = "strlen")] public long size ();