New modules unistr/u*-mbsnlen.
authorBruno Haible <bruno@clisp.org>
Mon, 11 Jun 2007 00:32:04 +0000 (00:32 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 11 Jun 2007 00:32:04 +0000 (00:32 +0000)
ChangeLog
lib/unistr.h

index 376c898fa2c8e75108631943c7d3f05806d150d5..6d762539e43d9c17679cb7acc6a7086a2e0a4e41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-10  Bruno Haible  <bruno@clisp.org>
+
+       * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
+       declarations.
+
 2007-06-10  Bruno Haible  <bruno@clisp.org>
 
        * lib/string_.h (mbsnlen): New declaration.
index 24218fbda23f60c3a8938aafd4634eb77a383e41..72852f7811cf8b477c8a76bb8a5a8e0d29f5e66a 100644 (file)
@@ -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.  */