From: Jürg Billeter Date: Fri, 20 Aug 2010 19:33:47 +0000 (+0200) Subject: glib-2.0: Add optional index parameter to string.get_char X-Git-Tag: 0.11.0~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afd78dbc351eeae9080dfc0e8bf8fd8393b07201;p=thirdparty%2Fvala.git glib-2.0: Add optional index parameter to string.get_char --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 15ab53647..e2dfd910d 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -967,7 +967,10 @@ public class string { [CCode (cname = "g_utf8_next_char")] public unowned string next_char (); [CCode (cname = "g_utf8_get_char")] - public unichar get_char (); + static unichar utf8_get_char (char* str); + public unichar get_char (int index = 0) { + return utf8_get_char ((char*) this + index); + } [CCode (cname = "g_utf8_get_char_validated")] public unichar get_char_validated (ssize_t max_len = -1); public unowned string offset (long offset) {