String.prototype.startWith = function(s) { 
if (s == null || s == "" || this.length == 0 || s.length > this.length)
return false;
if (this.substr(0, s.length) == s)
return true;
else
return false;
return true;
}

String.prototype.endWith = function(s) { if (s == null || s == "" || this.length == 0|| s.length > this.length) return false; if (this.substring(this.length - s.length) == s) return true; else return false; return true; }

 

相关文章:

  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
相关资源
相似解决方案