return this.lastIndexOf(pattern) == (this.length - pattern.length); 
var d = this.length - pattern.length; return d >= 0 && this.lastIndexOf(pattern) === d; 
  endsWith: function(pattern) {    return this.lastIndexOf(pattern) == (this.length - pattern.length);  },
5582	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5582/fc91a3e456ef26d0fe0296e4959fadfa2d081dd0/string.js/buggy/src/string.js