14.2.2 Determining if a string is empty

Preprocessor Macros: mbfl_string_empty (VAR)

Expand into the expression:

{ test ${#VAR} -eq 0; }

which evaluates to true if the string value in the variable VAR is the empty string.

Preprocessor Macros: mbfl_string_not_empty (VAR)

Expand into the expression:

{ test ${#VAR} -ne 0; }

which evaluates to true if the string value in the variable VAR is not the empty string.

Function: mbfl_string_is_empty STRING

Return successfully if STRING is empty.

Function: mbfl_string_is_not_empty STRING

Return successfully if STRING is not empty.


This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.