如何比较两个文本字符串是否相似,例如:
var a = "Hello Blue World";
var b = "Hello Blut World?";
if(a similar b)
{
console.log(true);
}发布于 2021-04-18 14:24:24
if 'n' is zero then strings are equal
var str1 = "ab";
var str2 = "cd";
var n = str1.localeCompare(str2);
console.log(n);
https://stackoverflow.com/questions/67145611
复制相似问题