Restoration
11/11/2016 - 11:25 AM

空文字判定

空文字判定

 /**
 * 空文字判定
 * null もしくはundefined、空文字であった場合trueを返す
 *
 * @param String str
 * @return bool
 */
 function checkEmptyStr(str){
      if( str == null || typeof(str) == "undefined" || str == '' ){
           return true;
      } else {
           return false;
      }

 }