StringUtil { public static String zenkakuToHankaku(String value) { if (value == null || "".equals(value)) { return value; } char[] chars = value.toCharArray(); StringBuilder returnValue = new StringBuilder(); String getValue = null; for (int i = 0; i < chars.length; i++) { getValue = getHankakuMoji(chars[i]); if (getValue != null) { returnValue.append(getValue); } else { returnValue.append(String.valueOf(chars[i])); } } return returnValue.toString(); }  static boolean isWhitespace(char c); static boolean isZenHankakuSpace(char c); static String rtrim(String str); static String ltrim(String str); static String trim(String str); static String rtrimZ(String str); static String ltrimZ(String str); static String trimZ(String str); static String toShortClassName(String longClassName); static String getExtension(String name); static String toHexString(byte[] byteArray, String delim); static String capitalizeInitial(String str); static String[] parseCSV(String csvString); static String[] parseCSV(String csvString, String escapeString); static String dump(Map<?, ?> map); static String getArraysStr(Object[] arrayObj); static String hankakuToZenkaku(String value); static String zenkakuToHankaku(String value); static String filter(String str); static String toLikeCondition(String condition); static int getByteLength(String value, String encoding); static final String LINE_SEP; static final String LIKE_ESC_CHAR; }
@Test public void testZenkakuToHankaku01() throws Exception { String input = "Ａ！ア"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("A!ｱ", result); }
@Test public void testZenkakuToHankaku02() throws Exception { String input = "Ａ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("A", result); }
@Test public void testZenkakuToHankaku03() throws Exception { String input = "カサタハ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("ｶｻﾀﾊ", result); }
@Test public void testZenkakuToHankaku04() throws Exception { String input = "ガザダ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("ｶﾞｻﾞﾀﾞ", result); }
@Test public void testZenkakuToHankaku05() throws Exception { String input = "パポ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("ﾊﾟﾎﾟ", result); }
@Test public void testZenkakuToHankaku06() throws Exception { String input = "Ａワ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("Aﾜ", result); }
@Test public void testZenkakuToHankaku07() throws Exception { String input = "Ａヲ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("Aｦ", result); }
@Test public void testZenkakuToHankaku08() throws Exception { String input = "ア\u30f7"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("ｱﾜﾞ", result); }
@Test public void testZenkakuToHankaku09() throws Exception { String input = "\u30faヴ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("ｦﾞｳﾞ", result); }
@Test public void testZenkakuToHankaku10() throws Exception { String input = "サ\u30faｲAピ"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("ｻｦﾞｲAﾋﾟ", result); }
@Test public void testZenkakuToHankaku11() throws Exception { String input = ""; String result = StringUtil.zenkakuToHankaku(input); assertEquals("", result); }
@Test public void testZenkakuToHankaku12() throws Exception { String input = null; String result = StringUtil.zenkakuToHankaku(input); assertEquals(null, result); }
@Test public void testZenkakuToHankaku13() throws Exception { String input = "入力値"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("入力値", result); }
@Test public void testZenkakuToHankaku14() throws Exception { String input = "ワ゜ヲ゜"; String result = StringUtil.zenkakuToHankaku(input); assertEquals("ﾜﾟｦﾟ", result); }