14.2.1 Determining the length of strings

Preprocessor Macros: mbfl_string_len (VAR)

Expands into the expression:

${#VAR}

which evaluates to the number of characters in the string in the variable VAR.

Function: mbfl_string_length STRING

Print an integer representing the length of STRING. The argument STRING can be an empty string.

Function: mbfl_string_length_equal_to LENGTH STRING

Return successfully if STRING has length equal to LENGTH. The argument LENGTH must be a non-negative integer; the argument STRING can be an empty string.


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