From: Jürg Billeter Date: Tue, 4 Aug 2009 10:01:44 +0000 (+0200) Subject: glib-2.0: Add string.to_utf8() method X-Git-Tag: 0.7.6~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f4c7dec8d16ede148824da2203b447d77db5763;p=thirdparty%2Fvala.git glib-2.0: Add string.to_utf8() method --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 6052c8d4a..9e415afd7 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -951,6 +951,13 @@ public class string { public long length { get { return this.len (); } } + + public char[] to_utf8 () { + char[] result = new char[this.size () + 1]; + result.length--; + GLib.Memory.copy (result, this, this.size ()); + return result; + } } [CCode (cprefix = "G", lower_case_cprefix = "g_", cheader_filename = "glib.h")]