Automattic\WooCommerce\Utilities
StringUtil::is_null_or_whitespace
Check if a string is null, is empty, or has only whitespace characters (space, tab, vertical tab, form feed, carriage return, new line)
Метод класса: StringUtil{}
Хуков нет.
Возвращает
true|false. True if the string is null, is empty, or contains only whitespace characters.
Использование
$result = StringUtil::is_null_or_whitespace( ?string $value );
- ?string $value(обязательный)
- .
Код StringUtil::is_null_or_whitespace() StringUtil::is null or whitespace WC 10.7.0
public static function is_null_or_whitespace( ?string $value ) {
return is_null( $value ) || '' === $value || ctype_space( $value );
}