@Test public void testFoldCase() { final String strTLD = ".cn"; char ch = 0x00DF; String strNew = "ss" + strTLD; String strOrg = String.valueOf(ch); String strFold = StringUtil.foldCase(strOrg) + strTLD; assertEquals(strNew, strFold); strNew = "i" + strTLD; strOrg = String.valueOf((char) 0x0049) + strTLD; strFold = StringUtil.foldCase(strOrg); assertEquals(strNew, strFold); String strNew1 = String.valueOf((char) 0x0069); String strNew2 = String.valueOf((char) 0x0307); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x0130) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x02BC); strNew2 = String.valueOf((char) 0x006E); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x0149) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x006A); strNew2 = String.valueOf((char) 0x030C); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x01F0) + strTLD; strFold = StringUtil.foldCase(strOrg); assertEquals(strNew, strFold); int intFold = 0x0390; strNew1 = String.valueOf((char) 0x03B9); strNew2 = String.valueOf((char) 0x0308); String strNew3 = String.valueOf((char) 0x0301); strNew = strNew1 + strNew2 + strNew3 + strTLD; strOrg = String.valueOf((char) intFold) + strTLD; strFold = StringUtil.foldCase(strOrg); assertEquals(strNew, strFold); strNew1 = String.valueOf((char) 0x03C5); strNew2 = String.valueOf((char) 0x0308); strNew3 = String.valueOf((char) 0x0301); strNew = strNew1 + strNew2 + strNew3 + strTLD; strOrg = String.valueOf((char) 0x03B0) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x0565); strNew2 = String.valueOf((char) 0x0582); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x0587) + strTLD; strFold = StringUtil.foldCase(strOrg); assertEquals(strNew, strFold); strNew1 = String.valueOf((char) 0x0068); strNew2 = String.valueOf((char) 0x0331); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x1E96) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x0074); strNew2 = String.valueOf((char) 0x0308); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x1E97) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x0077); strNew2 = String.valueOf((char) 0x030A); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x1E98) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x0079); strNew2 = String.valueOf((char) 0x030A); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x1E99) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x0061); strNew2 = String.valueOf((char) 0x02BE); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x1E9A) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x03C5); strNew2 = String.valueOf((char) 0x0313); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x1F50) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x03C5); strNew2 = String.valueOf((char) 0x0313); strNew3 = String.valueOf((char) 0x0300); strNew = strNew1 + strNew2 + strNew3 + strTLD; strOrg = String.valueOf((char) 0x1F52) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x03C5); strNew2 = String.valueOf((char) 0x0313); strNew3 = String.valueOf((char) 0x0301); strNew = strNew1 + strNew2 + strNew3 + strTLD; strOrg = String.valueOf((char) 0x1F54) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x03C5); strNew2 = String.valueOf((char) 0x0313); strNew3 = String.valueOf((char) 0x0342); strNew = strNew1 + strNew2 + strNew3 + strTLD; strOrg = String.valueOf((char) 0x1F56) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); strNew1 = String.valueOf((char) 0x1f00); strNew2 = String.valueOf((char) 0x03b9); strNew = strNew1 + strNew2 + strTLD; strOrg = String.valueOf((char) 0x1F88) + strTLD; assertEquals(strNew, StringUtil.foldCase(strOrg)); }
public static String foldCase(String strParam) { return UCharacter.foldCase(strParam, true); }
StringUtil { public static String foldCase(String strParam) { return UCharacter.foldCase(strParam, true); } }
StringUtil { public static String foldCase(String strParam) { return UCharacter.foldCase(strParam, true); } private  StringUtil(); }
StringUtil { public static String foldCase(String strParam) { return UCharacter.foldCase(strParam, true); } private  StringUtil(); static List<MediaType> parseMediaTypes(String mediaTypesStr); static MediaType parseMediaType(String mediaTypeStr); static boolean containNonAsciiPrintableChars(String decodeUri); static String generateEncodedRedirectURL(String param,
            String servicePartUri, String baseUrl); static List<String> parseSeparatedStringToListIfListIsNull(
            String separatedStr, List<String> list); static String addQuotas(String str); static boolean checkIsValidSearchPattern(String str); static boolean containsAtMostOnce(String str, String searchStr); static boolean isValidEntityHandleOrName(String handle); static String urlEncode(String str); static String getNormalization(String str); static long parseUnsignedLong(String s); static String foldCase(String strParam); static String foldCaseAndNormalization(String strParam); static List<String> getNotEmptyStringList(List<String> stringList); }
StringUtil { public static String foldCase(String strParam) { return UCharacter.foldCase(strParam, true); } private  StringUtil(); static List<MediaType> parseMediaTypes(String mediaTypesStr); static MediaType parseMediaType(String mediaTypeStr); static boolean containNonAsciiPrintableChars(String decodeUri); static String generateEncodedRedirectURL(String param,
            String servicePartUri, String baseUrl); static List<String> parseSeparatedStringToListIfListIsNull(
            String separatedStr, List<String> list); static String addQuotas(String str); static boolean checkIsValidSearchPattern(String str); static boolean containsAtMostOnce(String str, String searchStr); static boolean isValidEntityHandleOrName(String handle); static String urlEncode(String str); static String getNormalization(String str); static long parseUnsignedLong(String s); static String foldCase(String strParam); static String foldCaseAndNormalization(String strParam); static List<String> getNotEmptyStringList(List<String> stringList); static final String SPACE; static final String TLD_SPLITOR; static final String ASTERISK; static final String CHAR_SET_UTF8; static final String CHAR_SET_ISO8859; static final int MAX_ENTITY_HANDLE_LENGTH; }