4
would like to know if there is any function or operator that can check if a String looks like another in javascript for example:
var str1 = "joao foi ao mercado";
var str2 = "joao fo";
What I need is to compare the first with the second, if the second is a piece of the first then returns true (type the mysql like)
Take a look https://en.wikipedia.org/wiki/Levenshtein_distance
– Leonardo Pessoa
Or this question in the English OS describing the % similarity https://stackoverflow.com/questions/10473745/compare-strings-javascript-return-likely
– Leonardo Pessoa