14.9 Normalising strings

Function: mbfl_string_normalise_boolean_var NORMAL_RV STR

Normalise STR as a boolean string representation and store the result in the result variable NORMAL_RV; when successful return true, otherwise return false.

Normalised boolean values are: ‘true’, ‘false’.

Supported values for STR are: ‘true’, ‘false’, ‘yes’, ‘no’, ‘1’, ‘0’.

mbfl_declare_varref(NORMAL_STR)

mbfl_string_normalise_boolean_var mbfl_datavar(NORMAL_RV) 'yes'
$NORMAL_RV              ⇒ true
eval $NORMAL_RV         ⇒ 0

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