Javascript String toJadenCaseDoesNotWork()

Description

Javascript String toJadenCaseDoesNotWork()



String.prototype.toJadenCaseDoesNotWork = function () {
  //expression \b recognizes ' like I'll as the break point making it I'Ll.
  var upCase = '';
  upCase += this.toString().replace(/\b./g, function(a){
   return a.toUpperCase();
  })//  w  w w  .j  a v a2 s  .  c o m
  return upCase;
};



PreviousNext

Related