我想比较三个字符串:
"a text string" //target string
"a kind of similar text string"
"the cow jumps over the moon"
并设置一个百分比参数,返回与目标相似 x% 的结果。
$results = compare($array,$target,80)
$results // Returns an array with str 1,2, because they are at least 80 similar to the target.
另外,在 JavaScript 或 jQuery 中是否可能有类似的功能?