Android Utililty Methods Longest Common String Get

List of utility methods to do Longest Common String Get

Description

The list of methods to do Longest Common String Get are organized into topic(s).

Method

StringlongestCommonSubstring(final String s1, final String s2)
longest Common Substring
for (int i = 0; i < s1.length() && i < s2.length(); i++) {
    if (s1.charAt(i) != s2.charAt(i)) {
        return s1.substring(0, i);
return s1.length() < s2.length() ? s1 : s2;