X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/common/cstring.c?ds=sidebyside diff --git a/icuSources/common/cstring.c b/icuSources/common/cstring.c index a5b2c6bb..3af959eb 100644 --- a/icuSources/common/cstring.c +++ b/icuSources/common/cstring.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1997-2003, International Business Machines +* Copyright (C) 1997-2011, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -46,6 +46,17 @@ * and the set of uppercase Latin letters is discontiguous as well. */ +U_CAPI UBool U_EXPORT2 +uprv_isASCIILetter(char c) { +#if U_CHARSET_FAMILY==U_EBCDIC_FAMILY + return + ('a'<=c && c<='i') || ('j'<=c && c<='r') || ('s'<=c && c<='z') || + ('A'<=c && c<='I') || ('J'<=c && c<='R') || ('S'<=c && c<='Z'); +#else + return ('a'<=c && c<='z') || ('A'<=c && c<='Z'); +#endif +} + U_CAPI char U_EXPORT2 uprv_toupper(char c) { #if U_CHARSET_FAMILY==U_EBCDIC_FAMILY @@ -217,9 +228,9 @@ T_CString_stringToInteger(const char *integerString, int32_t radix) return uprv_strtoul(integerString, &end, radix); } - + U_CAPI int U_EXPORT2 -T_CString_stricmp(const char *str1, const char *str2) { +uprv_stricmp(const char *str1, const char *str2) { if(str1==NULL) { if(str2==NULL) { return 0; @@ -258,7 +269,7 @@ T_CString_stricmp(const char *str1, const char *str2) { } U_CAPI int U_EXPORT2 -T_CString_strnicmp(const char *str1, const char *str2, uint32_t n) { +uprv_strnicmp(const char *str1, const char *str2, uint32_t n) { if(str1==NULL) { if(str2==NULL) { return 0;