Using substr method to check string start - Node.js String

Node.js examples for String:String Start

Description

Using substr method to check string start

Demo Code

String.prototype.startsWith = function( value )
{
  return ( this.substr( 0, value.length ) == value ) ;
}

Related Tutorials