diff options
author | Bruno Haible <bruno@clisp.org> | 2009-04-05 15:40:36 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-04-05 15:40:36 +0200 |
commit | 720fc85a3daaf654e7edb05ae3c652e7d9d4b52c (patch) | |
tree | 838dcfb678dd67d64d9769acddcfff6a11e752e4 /doc | |
parent | 47ba2048b95b49e47e72e3b59c4efba4e0082337 (diff) | |
download | libunistring-720fc85a3daaf654e7edb05ae3c652e7d9d4b52c.tar.gz |
Document u*_cmp2.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/unistr.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/unistr.texi b/doc/unistr.texi index b2f83b8..32e97e9 100644 --- a/doc/unistr.texi +++ b/doc/unistr.texi @@ -169,6 +169,21 @@ This function is similar to @posixfunc{memcmp}, except that it operates on Unicode strings. @end deftypefun +The following function compares two Unicode strings of possibly different +lengths. + +@deftypefun int u8_cmp2 (const uint8_t *@var{s1}, size_t @var{n1}, const uint8_t *@var{s2}, size_t @var{n2}) +@deftypefunx int u16_cmp2 (const uint16_t *@var{s1}, size_t @var{n1}, const uint16_t *@var{s2}, size_t @var{n2}) +@deftypefunx int u32_cmp2 (const uint32_t *@var{s1}, size_t @var{n1}, const uint32_t *@var{s2}, size_t @var{n2}) +Compares @var{s1} and @var{s2}, lexicographically. +Returns a negative value if @var{s1} compares smaller than @var{s2}, +a positive value if @var{s1} compares larger than @var{s2}, or 0 if +they compare equal. + +This function is similar to @func{memcmp2}, except that it operates on +Unicode strings. +@end deftypefun + The following function searches for a given Unicode character. @deftypefun {uint8_t *} u8_chr (const uint8_t *@var{s}, size_t @var{n}, ucs4_t @var{uc}) |