public function str($value, $minLength = 0, $maxLength = false, $default = false)
	{
		$value = trim($value);
		if ((!empty($minLength) && (mb_strlen($value, $this->encoding) < $minLength)) ||
			(!empty($maxLength) && (mb_strlen($value, $this->encoding) > $maxLength))
		) {
			return $default;
		}

		return (string) $value;
	}
public function str($value, $minLength = 0, $maxLength = false, $default = false)
	{
		$value = trim($value);
		if ((!empty($minLength) && (mb_strlen($value, $this->encoding) < $minLength)) ||
			(!empty($maxLength) && (mb_strlen($value, $this->encoding) > $maxLength))
		) {
			return $default;
		}

		return (string) $value;
	}
public function str ( $ value , $ minLength = 0 , $ maxLength = false , $ default = false ) { $ value = trim ( $ value ) ; if ( ( ! empty ( $ minLength ) && ( mb_strlen ( $ value , $ this -> encoding ) < $ minLength ) ) || ( ! empty ( $ maxLength ) && ( mb_strlen ( $ value , $ this -> encoding ) > $ maxLength ) ) ) { return $ default ; } return ( string ) $ value ; }
Validates string value.

@param string  $value
@param integer $minLength
@param mixed   $maxLength
@param mixed   $default

@return mixed
Validates string value .