public void CommonPrefixFirstStringIsSubstringOfSecondCommonPrefixIsDetected() { // Whole case. Assert.AreEqual(4, TextUtil.CommonPrefix("1234", "1234xyz")); }
public void CommonPrefixDisjunctStringsNoCommonPrefix() { // Detect any common suffix. // Null case. Assert.AreEqual(0, TextUtil.CommonPrefix("abc", "xyz")); }
public void CommonPrefixBothStringsStartWithSameCommonPrefixIsDetected2() { // Non-null case. Assert.AreEqual(4, TextUtil.CommonPrefix("abc1234abcdef", "efgh1234xyz", 3, 4)); }
public void CommonPrefixBothStringsStartWithSameCommonPrefixIsDetected() { // Non-null case. Assert.Equal(4, TextUtil.CommonPrefix("1234abcdef", "1234xyz")); }