String.h.in 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*============================================================================
  2. KWSys - Kitware System Library
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef @KWSYS_NAMESPACE@_String_h
  11. #define @KWSYS_NAMESPACE@_String_h
  12. #include <@KWSYS_NAMESPACE@/Configure.h>
  13. #include <stddef.h> /* size_t */
  14. /* Redefine all public interface symbol names to be in the proper
  15. namespace. These macros are used internally to kwsys only, and are
  16. not visible to user code. Use kwsysHeaderDump.pl to reproduce
  17. these macros after making changes to the interface. */
  18. #if !defined(KWSYS_NAMESPACE)
  19. # define kwsys_ns(x) @KWSYS_NAMESPACE@##x
  20. # define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
  21. #endif
  22. #if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
  23. # define kwsysString_strcasecmp kwsys_ns(String_strcasecmp)
  24. # define kwsysString_strncasecmp kwsys_ns(String_strncasecmp)
  25. #endif
  26. #if defined(__cplusplus)
  27. extern "C"
  28. {
  29. #endif
  30. /**
  31. * Compare two strings ignoring the case of the characters. The
  32. * integer returned is negative, zero, or positive if the first string
  33. * is found to be less than, equal to, or greater than the second
  34. * string, respectively.
  35. */
  36. kwsysEXPORT int kwsysString_strcasecmp(const char* lhs, const char* rhs);
  37. /**
  38. * Identical to String_strcasecmp except that only the first n
  39. * characters are considered.
  40. */
  41. kwsysEXPORT int kwsysString_strncasecmp(const char* lhs, const char* rhs,
  42. size_t n);
  43. #if defined(__cplusplus)
  44. } /* extern "C" */
  45. #endif
  46. /* If we are building a kwsys .c or .cxx file, let it use these macros.
  47. Otherwise, undefine them to keep the namespace clean. */
  48. #if !defined(KWSYS_NAMESPACE)
  49. # undef kwsys_ns
  50. # undef kwsysEXPORT
  51. # if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
  52. # undef kwsysString_strcasecmp
  53. # undef kwsysString_strncasecmp
  54. # endif
  55. #endif
  56. #endif