I has found this android method TextUtils.regionMatches
But for some reason, so it is not clear how this function works.
The function can be found here:
http://developer.android.com/reference/android/text/TextUtils.html#regionMatches%28java.lang.CharSequence,%20int,%20java.lang.CharSequence,%20int,%20int%29
And the base code for this method here,
http://androidxref.com/4.1.1/xref/frameworks/base/core/java/android/text/TextUtils.java#220
Thanks for those who might shed some light on how the function is called.
Sample code:
match is true.
Explanation:
In charsequence one, start from
toffset(4) and get a number of characters equal tolen(6) => QWERTYIn charsequence two, start from
ooffset(8) and get a number of characters equal tolen(6) => QWERTYBoth charsequences match, so the method returns true.