From 3f4ee7e103cf12ed2aae4c088d0449c4a042b688 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 23 Jun 2016 15:08:12 +0800 Subject: write pinyin_get_character_offset function --- src/pinyin.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/pinyin.h') diff --git a/src/pinyin.h b/src/pinyin.h index b15925a..de1be7c 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -898,6 +898,20 @@ bool pinyin_get_right_character_offset(pinyin_instance_t * instance, size_t offset, size_t * right); +/** + * pinyin_get_character_offset: + * @instance: the pinyin instance. + * @offset: the lookup offset. + * @length: the character offset. + * @returns: whether the get operation is successful. + * + * Get the character offset from the lookup offset. + * + */ +bool pinyin_get_character_offset(pinyin_instance_t * instance, + size_t offset, + size_t * length); + #if 0 /** * pinyin_get_raw_full_pinyin: -- cgit