# usc-e-shop/1.4.0/classes/utilities.class.php

Welcart e-Commerce, version 1.4.0. 35 lines.

- Page: https://pluginprobe.com/plugins/usc-e-shop/1.4.0/code/classes/utilities.class.php
- Raw: https://pluginprobe.com/plugins/usc-e-shop/1.4.0/raw/classes/utilities.class.php
- Modified: 2014-03-03T17:55:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/usc-e-shop/1.4.0/code/classes/utilities.class.php#L10-L20`.

```php
<?php
class WCUtils
{
	static function is_blank($val, $strict=false){
		
		if ( !is_scalar($val) && NULL != $val ){
			trigger_error("Value is not a scalar", E_USER_NOTICE);
			return true;
		}
		
		if($strict)
			$val = preg_replace("/　/", "", $val);

		$val = trim($val); 
		if ( strlen($val) > 0 )
			return false; 
		else
			return true; 
	}
	
	static function is_zero($val){
		
		if ( !is_scalar($val) && NULL != $val ){
			trigger_error("Value is not a scalar", E_USER_NOTICE);
			return false;
		}
		
		$val = trim($val); 
		if( !WCUtils::is_blank($val) && is_numeric($val) && 1 === strlen($val) && 0 === (int)$val )
			return true;
		else
			return false; 
	}
}
?>
```
