Javascript String empty(pattern)

Description

Javascript String empty(pattern)


/**/* ww  w .  ja  v a 2 s. c  o  m*/
 *  String#empty() -> Boolean
 *
 *  Checks if the string is empty.
 *
 *  ##### Example
 *
 *      ''.empty();
 *      //-> true
 *
 *      '  '.empty();
 *      //-> false
**/
String.prototype.empty = function(pattern) {
  return this == '';
};



PreviousNext

Related