From fa662f811f9a6dda54f64639b107b1637c3ba2e5 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 11 Jun 2007 00:32:04 +0000 Subject: [PATCH] New modules unistr/u*-mbsnlen. --- ChangeLog | 5 +++++ lib/unistr.h | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 376c898fa2..6d762539e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-10 Bruno Haible + + * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New + declarations. + 2007-06-10 Bruno Haible * lib/string_.h (mbsnlen): New declaration. diff --git a/lib/unistr.h b/lib/unistr.h index 24218fbda2..72852f7811 100644 --- a/lib/unistr.h +++ b/lib/unistr.h @@ -411,6 +411,15 @@ extern uint16_t * extern uint32_t * u32_chr (const uint32_t *s, size_t n, ucs4_t uc); +/* Count the number of Unicode characters in the N units from S. */ +/* Similar to mbsnlen(). */ +extern size_t + u8_mbsnlen (const uint8_t *s, size_t n); +extern size_t + u16_mbsnlen (const uint16_t *s, size_t n); +extern size_t + u32_mbsnlen (const uint32_t *s, size_t n); + /* Elementary string functions with memory allocation. */ /* Make a freshly allocated copy of S, of length N. */ -- 2.30.2