2 * Copyright (C) 1995-2008, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: cclstr.c,v 1.4 2008-01-09 21:32:28 adam Exp $
9 * \brief Implements CCL string compare utilities
17 static int ccli_toupper (int c)
22 int (*ccl_toupper)(int c) = NULL;
24 int ccl_stricmp (const char *s1, const char *s2)
27 ccl_toupper = ccli_toupper;
31 c1 = (*ccl_toupper)(*s1);
32 c2 = (*ccl_toupper)(*s2);
38 return (*ccl_toupper)(*s1) - (*ccl_toupper)(*s2);
41 int ccl_memicmp (const char *s1, const char *s2, size_t n)
44 ccl_toupper = ccli_toupper;
49 c1 = (*ccl_toupper)(*s1);
50 c2 = (*ccl_toupper)(*s2);
51 if (n <= 1 || c1 != c2)
62 * indent-tabs-mode: nil
64 * vim: shiftwidth=4 tabstop=8 expandtab