From 6fc13dad84b2b315ea33af180d907e63a632accd Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Fri, 10 Jun 2022 11:46:13 +0200 Subject: Changed a few cstr utf8 function names. --- include/stc/cstr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/stc/cstr.h b/include/stc/cstr.h index 41db1cd3..a6d4beb1 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -189,13 +189,13 @@ STC_INLINE size_t cstr_u8size(cstr s) STC_INLINE size_t cstr_u8size_n(cstr s, size_t nbytes) { return utf8_size_n(cstr_str(&s), nbytes); } -STC_INLINE size_t cstr_bytepos(const cstr* self, size_t u8idx) +STC_INLINE size_t cstr_pos_u8(const cstr* self, size_t u8idx) { return utf8_pos(cstr_str(self), u8idx); } -STC_INLINE const char* cstr_at(const cstr* self, size_t u8idx) +STC_INLINE const char* cstr_at_u8(const cstr* self, size_t u8idx) { return utf8_at(cstr_str(self), u8idx); } -STC_INLINE csview cstr_chr(const cstr* self, size_t u8idx) { +STC_INLINE csview cstr_chr_u8(const cstr* self, size_t u8idx) { csview sv = cstr_sv(self); sv.str = utf8_at(sv.str, u8idx); sv.size = utf8_chr_size(sv.str); -- cgit v1.2.3