I have a list of phrases:
[
\"according to all known laws of aviation\",
\"time flies when you\'re having fun...\"
...
]
I would like to
I converted the answer from the Python question into Javascript after doing some research on the Python language:
function OverlapTest(input, compare) {
for (var i = 0; i < input.length; i++) {
if (compare.startsWith(input.substring(i))) {
return true;
}
}
return false;
}
This will return true
if the strings overlap at the start and end and false
if they don't.