X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=JavaScriptCore%2Fwtf%2Funicode%2Ficu%2FUnicodeIcu.h;h=4501f1a3f90cec287671451a135ce2dcc0b38845;hp=82e59deb594c00881d5a7180820d946e959c012d;hb=1e554be6e8a7138d3ba40d248fd6c8b3ba3d6b3d;hpb=24de5af00138b761500cfd977b07ea43811575e1 diff --git a/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h b/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h index 82e59deb594c..4501f1a3f90c 100644 --- a/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h +++ b/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h @@ -131,26 +131,6 @@ namespace WTF { return realLength; } - inline int toLower(UChar* str, int strLength, UChar*& destIfNeeded) - { - UErrorCode err = U_ZERO_ERROR; - int resultLength; - destIfNeeded = 0; - - resultLength = u_strToLower(0, 0, str, strLength, "", &err); - - if (resultLength <= strLength) { - err = U_ZERO_ERROR; - u_strToLower(str, resultLength, str, strLength, "", &err); - } else { - err = U_ZERO_ERROR; - destIfNeeded = static_cast(malloc(resultLength * sizeof(UChar))); - u_strToLower(destIfNeeded, resultLength, str, strLength, "", &err); - } - - return U_FAILURE(err) ? -1 : resultLength; - } - inline int toLower(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error) { UErrorCode status = U_ZERO_ERROR; @@ -169,26 +149,6 @@ namespace WTF { return u_toupper(c); } - inline int toUpper(UChar* str, int strLength, UChar*& destIfNeeded) - { - UErrorCode err = U_ZERO_ERROR; - int resultLength; - destIfNeeded = 0; - - resultLength = u_strToUpper(0, 0, str, strLength, "", &err); - - if (resultLength <= strLength) { - err = U_ZERO_ERROR; - u_strToUpper(str, resultLength, str, strLength, "", &err); - } else { - err = U_ZERO_ERROR; - destIfNeeded = (UChar*)malloc(resultLength * sizeof(UChar)); - u_strToUpper(destIfNeeded, resultLength, str, strLength, "", &err); - } - - return U_FAILURE(err) ? -1 : resultLength; - } - inline int toUpper(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error) { UErrorCode status = U_ZERO_ERROR;