comparison lib/mbspcasecmp.c @ 13478:957a79f455ba

mbspcasecmp: Fix function specification.
author Bruno Haible <bruno@clisp.org>
date Wed, 28 Jul 2010 00:53:16 +0200
parents c2cbabec01dd
children 97fc9a21a8fb
comparison
equal deleted inserted replaced
13477:078abad70fe8 13478:957a79f455ba
1 /* Case-insensitive string comparison function. 1 /* Case-insensitive string comparison function.
2 Copyright (C) 1998-1999, 2005-2010 Free Software Foundation, Inc. 2 Copyright (C) 1998-1999, 2005-2008, 2010 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2007. 3 Written by Bruno Haible <bruno@clisp.org>, 2007.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation; either version 3 of the License, or
26 26
27 #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) 27 #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
28 28
29 /* Compare the initial segment of the character string STRING consisting of 29 /* Compare the initial segment of the character string STRING consisting of
30 at most mbslen (PREFIX) characters with the character string PREFIX, 30 at most mbslen (PREFIX) characters with the character string PREFIX,
31 ignoring case, returning less than, equal to or greater than zero if this 31 ignoring case. If the two match, return a pointer to the first byte
32 initial segment is lexicographically less than, equal to or greater than 32 after this prefix in STRING. Otherwise, return NULL.
33 PREFIX. 33 Note: This function may, in multibyte locales, return non-NULL if STRING
34 Note: This function may, in multibyte locales, return 0 if STRING is of 34 is of smaller length than PREFIX! */
35 smaller length than PREFIX! */
36 char * 35 char *
37 mbspcasecmp (const char *string, const char *prefix) 36 mbspcasecmp (const char *string, const char *prefix)
38 { 37 {
39 /* This is essentially the same as 38 /* This is essentially the same as
40 mbsncasecmp (string, prefix, mbslen (prefix)) 39 mbsncasecmp (string, prefix, mbslen (prefix))