public static CharSequence commonPrefix(CharSequence str1, CharSequence str2) {
		if (isEmpty(str1) || isEmpty(str2)) {
			return EMPTY;
		}
		final int minLength = Math.min(str1.length(), str2.length());

		int index = 0;

		for (; index < minLength; index++) {

			if (str1.charAt(index) != str2.charAt(index)) {
				break;
			}
		}
		return str1.subSequence(0, index);
	}
@Test
	public void commonPrefixTest() throws Exception{

		// -------------------------- None match -----------------------

		assertEquals("", CharSequenceUtil.commonPrefix("", "abc"));
		assertEquals("", CharSequenceUtil.commonPrefix(null, "abc"));
		assertEquals("", CharSequenceUtil.commonPrefix("abc", null));
		assertEquals("", CharSequenceUtil.commonPrefix("abc", ""));

		assertEquals("", CharSequenceUtil.commonPrefix("azzzj", "bzzzj"));

		assertEquals("", CharSequenceUtil.commonPrefix("english中文", "french中文"));

		// -------------------------- Matched -----------------------

		assertEquals("name_", CharSequenceUtil.commonPrefix("name_abc", "name_efg"));

		assertEquals("zzzj", CharSequenceUtil.commonPrefix("zzzja", "zzzjb"));

		assertEquals("中文", CharSequenceUtil.commonPrefix("中文english", "中文french"));

		// { space * 10 } + "abc"
		final String str1 = CharSequenceUtil.repeat(CharSequenceUtil.SPACE, 10) + "abc";

		// { space * 5 } + "efg"
		final String str2 = CharSequenceUtil.repeat(CharSequenceUtil.SPACE, 5) + "efg";

		// Expect common prefix: { space * 5 }
		assertEquals(CharSequenceUtil.repeat(CharSequenceUtil.SPACE, 5), CharSequenceUtil.commonPrefix(str1, str2));
	}