Re: GtkTextBuffer: Q: offsets to indicies?



On Thu, 01 Aug 2002 09:50:16 +0200 "Janus N. T" <janus bananus dk> wrote:

My problem is the handling of multibyte characters. I need to be able to
somehow convert an integer offset in the GtkTextBuffer into a index
(somthing a. la. gtk_text_buffer_get_iter_from_index). But I cannot find
such a function?

this is my function:

glong utf8_byteoffset_to_charsoffset(gchar *string, glong byteoffset) {
        return g_utf8_pointer_to_offset(string, &string[byteoffset]);
}

regards,
        Olivier

Attachment: pgpXXjyvtn3ax.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]