home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / common / cstring.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-19  |  2.6 KB  |  72 lines

  1. /*
  2. *******************************************************************************
  3. *                                                                             *
  4. * COPYRIGHT:                                                                  *
  5. *   (C) Copyright Taligent, Inc.,  1997                                       *
  6. *   (C) Copyright International Business Machines Corporation,  1997-1999     *
  7. *   Licensed Material - Program-Property of IBM - All Rights Reserved.        *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure   *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                    *
  10. *                                                                             *
  11. *******************************************************************************
  12. *
  13. * File CSTRING.H
  14. *
  15. * Contains CString interface
  16. *
  17. * @author       Helena Shih
  18. *
  19. * Modification History:
  20. *
  21. *   Date        Name        Description
  22. *   6/17/98     hshih       Created.
  23. *  05/03/99     stephen     Changed from functions to macros.
  24. *  06/14/99     stephen     Added icu_strncat, icu_strncmp, icu_tolower
  25. *
  26. *******************************************************************************
  27. */
  28.  
  29. #ifndef CSTRING_H
  30. #define CSTRING_H 1
  31.  
  32. #include <string.h>
  33. #include <ctype.h>
  34.  
  35. #include "utypes.h"
  36.  
  37. #define icu_strcpy(dst, src) strcpy(dst, src)
  38. #define icu_strcpyWithSize(dst, src, size) strncpy(dst, src, size)
  39. #define icu_strncpy(dst, src, size) strncpy(dst, src, size)
  40. #define icu_strlen(str) strlen(str)
  41. #define icu_strcmp(s1, s2) strcmp(s1, s2)
  42. #define icu_strncmp(s1, s2, n) strncmp(s1, s2, n)
  43. #define icu_strcat(dst, src) strcat(dst, src)
  44. #define icu_strncat(dst, src, n) strncat(dst, src, n)
  45. #define icu_strchr(s, c) strchr(s, c)
  46. #define icu_strrchr(s, c) strrchr(s, c)
  47. #define icu_toupper(c) toupper(c)
  48. #define icu_tolower(c) tolower(c)
  49.  
  50. /*===========================================================================*/
  51. /* Wide-character functions                                                  */
  52. /*===========================================================================*/
  53. #define icu_wcscat(dst, src) wcscat(dst, src)
  54. #define icu_wcscpy(dst, src) wcscpy(dst, src)
  55. #define icu_wcslen(src) wcslen(src)
  56. #define icu_wcstombs(mbstr, wcstr, count) wcstombs(mbstr, wcstr, count)
  57. #define icu_mbstowcs(wcstr, mbstr, count) mbstowcs(wcstr, mbstr, count)
  58.  
  59. U_CAPI char* U_EXPORT2
  60. T_CString_toLowerCase(char* str);
  61.  
  62. U_CAPI char* U_EXPORT2
  63. T_CString_toUpperCase(char* str);
  64.  
  65. U_CAPI void U_EXPORT2
  66. T_CString_integerToString(char *buffer, int32_t n, int32_t radix);
  67.  
  68. U_CAPI int32_t U_EXPORT2
  69. T_CString_stringToInteger(const char *integerString, int32_t radix);
  70.  
  71. #endif /* ! CSTRING_H */
  72.