From 8cb281352faa24072099e88c2181328f87fc8298 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 7 Feb 2009 23:31:49 +0100 Subject: [PATCH] New modules unistr/u{8,16,32}-strcoll. --- ChangeLog | 2 ++ lib/unistr.h | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 33c85fd9cc..6e79309c54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-02-07 Bruno Haible + * lib/unistr.h (u8_strcoll, u16_strcoll, u32_strcoll): New declations. + New module 'unistr/u32-strcoll'. * modules/unistr/u32-strcoll: New file. * lib/unistr/u32-strcoll.c: New file. diff --git a/lib/unistr.h b/lib/unistr.h index 568a587bca..c551f2ce57 100644 --- a/lib/unistr.h +++ b/lib/unistr.h @@ -1,5 +1,5 @@ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2008 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -553,6 +553,17 @@ extern int extern int u32_strcmp (const uint32_t *s1, const uint32_t *s2); +/* Compare S1 and S2 using the collation rules of the current locale. + Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2. + Upon failure, set errno and return any value. */ +/* Similar to strcoll(), wcscoll(). */ +extern int + u8_strcoll (const uint8_t *s1, const uint8_t *s2); +extern int + u16_strcoll (const uint16_t *s1, const uint16_t *s2); +extern int + u32_strcoll (const uint32_t *s1, const uint32_t *s2); + /* Compare no more than N units of S1 and S2. */ /* Similar to strncmp(), wcsncmp(). */ extern int -- 2.30.2