Skip to main content

nonEmpty

Checks whether the given string, list or map is non empty. A String is non empty if it contains any non-whitespace character. A list or map is non empty if their length > 0.

nonEmpty(targetString | targetList | targetMap)

Parameters#

  • targetString: string to check for non emptiness
  • targetList: list to check for non emptiness
  • targetMap: map to check for non emptiness

Returns#

  • Modified list

Example#

assertFalse(nonEmpty('  '))