strcase.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Case-insensitive string comparison functions.
  2. Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
  14. #ifndef _STRCASE_H
  15. #define _STRCASE_H
  16. #include <stddef.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /* Compare strings S1 and S2, ignoring case, returning less than, equal to or
  21. greater than zero if S1 is lexicographically less than, equal to or greater
  22. than S2.
  23. Note: This function may, in multibyte locales, return 0 for strings of
  24. different lengths! */
  25. extern int strcasecmp (const char *s1, const char *s2);
  26. /* Compare no more than N characters of strings S1 and S2, ignoring case,
  27. returning less than, equal to or greater than zero if S1 is
  28. lexicographically less than, equal to or greater than S2.
  29. Note: This function can not work correctly in multibyte locales. */
  30. extern int strncasecmp (const char *s1, const char *s2, size_t n);
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* _STRCASE_H */