JS endWith
2021-02-12 05:19
阅读:548
标签:ant blog 调用 dex code lock csdn OLE https JS endWith 标签:ant blog 调用 dex code lock csdn OLE https 原文地址:https://www.cnblogs.com/Alex-Mercer/p/13032825.html参考地址
代码
String.prototype.endWith = function (endStr) {
var d = this.length - endStr.length;
return (d >= 0 && this.lastIndexOf(endStr) == d);
}
调用
var str="I love antzone";
console.log(str.endWith("ne"));
评论
亲,登录后才可以留言!