Match String end - Node.js String

Node.js examples for String:String End

Description

Match String end

Demo Code

String.prototype.endsWith   = function(str) {
     return this.length >= str.length && this.substr(this.length - str.length) == str;
}

Related Tutorials