]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add optional index parameter to string.get_char
authorJürg Billeter <j@bitron.ch>
Fri, 20 Aug 2010 19:33:47 +0000 (21:33 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 20 Aug 2010 19:33:47 +0000 (21:33 +0200)
vapi/glib-2.0.vapi

index 15ab536475d97b0e29381642c2d9574a2b214003..e2dfd910d7280e457a824a7da70ee43bb6ae8558 100644 (file)
@@ -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) {