[Vala] Convert from byte to character offset in string
- From: James Moschou <james moschou gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] Convert from byte to character offset in string
- Date: Wed, 14 Jul 2010 12:00:58 +0930
Hello,
Is there a convenient way to convert from a byte index in a string to
its character offset and vice-versa?
I know string has pointer_to_offset(string pos), but that's for
pointers, I have the value of a byte index, i.e. an int/uint/long
value, not a pointer.
Thanks,
James
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]