Here you can find the source of endsWith(suffix)
/**/*w w w . ja va 2 s. com*/ * Does the string end with the specified <tt>suffix</tt>? * <p>From Ruby on Rails.</p> * * @param {String} suffix The specified suffix. * @returns {Boolean} */ String.prototype.endsWith = function (suffix) { return this.substring(this.length - suffix.length) == suffix; };
String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; };
String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; }; String.prototype.replaceAll = function (replaceThis, withThis) { var re = new RegExp(replaceThis,"g"); return this.replace(re, withThis); };
String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; }; function isImage(link) { return link.data.url.endsWith("jpg") || link.data.url.endsWith("png"); window.onload = function() { chrome.topSites.get(buildPopupDom);
String.prototype.endsWith = function(suffix) { return this.slice(-suffix.length) == suffix;
String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; };
String.prototype.endsWith = function(t, i) { if (i == false) { return (t == this.substring(this.length - t.length)); } else { return (t.toLowerCase() == this.substring(this.length - t.length).toLowerCase()); };
String.prototype.endsWith = function(test) { return this.length >= test.length && this.substr(this.length - test.length) == test;
String.prototype.endsWith = function (text) { return this.substring(this.length - text.length) === text; };
String.prototype.endsWith = function(text) { return text != null && this.lastIndexOf(text) == this.length - text.length; };