@Test public void givenAllCJKVChars_whenIsCJKV_thenIExpectTrue() { boolean result = CJKVUtil.isCJKV(CJKV_CHARS); assertTrue(result); }
public static boolean isCJKV(@Nullable String value) { if (value == null || value.length() == 0) { return true; } for (int offset = 0; offset < value.length(); ) { int codepoint = Character.codePointAt(value, offset); if (!isCodepointCJKV(codepoint)) { return false; } offset += Character.charCount(codepoint); } return true; }
CJKVUtil { public static boolean isCJKV(@Nullable String value) { if (value == null || value.length() == 0) { return true; } for (int offset = 0; offset < value.length(); ) { int codepoint = Character.codePointAt(value, offset); if (!isCodepointCJKV(codepoint)) { return false; } offset += Character.charCount(codepoint); } return true; } }
CJKVUtil { public static boolean isCJKV(@Nullable String value) { if (value == null || value.length() == 0) { return true; } for (int offset = 0; offset < value.length(); ) { int codepoint = Character.codePointAt(value, offset); if (!isCodepointCJKV(codepoint)) { return false; } offset += Character.charCount(codepoint); } return true; } private  CJKVUtil(); }
CJKVUtil { public static boolean isCJKV(@Nullable String value) { if (value == null || value.length() == 0) { return true; } for (int offset = 0; offset < value.length(); ) { int codepoint = Character.codePointAt(value, offset); if (!isCodepointCJKV(codepoint)) { return false; } offset += Character.charCount(codepoint); } return true; } private  CJKVUtil(); static boolean isCJKV(@Nullable String value); }
CJKVUtil { public static boolean isCJKV(@Nullable String value) { if (value == null || value.length() == 0) { return true; } for (int offset = 0; offset < value.length(); ) { int codepoint = Character.codePointAt(value, offset); if (!isCodepointCJKV(codepoint)) { return false; } offset += Character.charCount(codepoint); } return true; } private  CJKVUtil(); static boolean isCJKV(@Nullable String value);  }