Add method to String to check ends with - Node.js String

Node.js examples for String:String End

Description

Add method to String to check ends with

Demo Code


String.prototype.endsWith = function(str)
{return (this.match(str+"$")==str)}

Related Tutorials