suve

awful: function: arr-empty

Declaration

bool :dict-empty ( array $ARR )
bool :dict-empty ( dict $DICT )
bool :arr-empty ( array $ARR )
bool :arr-empty ( dict $DICT )

Summary

Checks if array or dictionary is empty. It is recommended the value is passed by reference, as this saves the work of copying the array/dict. Can be passed multiple arguments; will return TRUE if all arrs/dicts are empty.

Example

# :arr-empty example.
:set &A :arr
:writeln :arr-empty &A
:set &A[i10] i10
:writeln :dict-empty &A

wikipage modified on 2014/0601/2316