projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
60ed215
)
New modules unistr/u*-mbsnlen.
author
Bruno Haible
<bruno@clisp.org>
Mon, 11 Jun 2007 00:32:04 +0000
(
00:32
+0000)
committer
Bruno Haible
<bruno@clisp.org>
Mon, 11 Jun 2007 00:32:04 +0000
(
00:32
+0000)
ChangeLog
patch
|
blob
|
history
lib/unistr.h
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
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.
2007-06-10 Bruno Haible <bruno@clisp.org>
* lib/string_.h (mbsnlen): New declaration.
diff --git
a/lib/unistr.h
b/lib/unistr.h
index 24218fbda23f60c3a8938aafd4634eb77a383e41..72852f7811cf8b477c8a76bb8a5a8e0d29f5e66a 100644
(file)
--- 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);
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. */
/* Elementary string functions with memory allocation. */
/* Make a freshly allocated copy of S, of length N. */