Javascript String startsFrom()

Description

Javascript String startsFrom()


// ObjectPrototypes.js


// startsFrom//  w w w . j  a  v a 2  s  .  co  m

String.prototype.startsFrom = startsFrom;

function startsFrom ( s2 )
{
  return (this.toString().substring(0, s2.length) == s2 )
}



PreviousNext

Related