-
Notifications
You must be signed in to change notification settings - Fork 0
All
The listutils:all function checks if all elements in a list have a non-zero data get value.
Input is given using the listutils:in storage:
| Field | Meaning |
|---|---|
List |
The list to check. |
After defining the input, run the function listutils:all.
Errors that display when executing the listutils:all function as a player in debug mode.
| Error | Message |
|---|---|
| TBD | TBD |
The success of the operation is stored in the $listutils.success listutils.out score. This score is 1 on success and 0 otherwise. The success is 0 when any element does not have a non-zero data get value.
The result of the operation is stored in the $listutils.result listutils.out score and is equal to the success.
Take the example list ExampleList: ["foo", "Hello World!", "", "bar"] in the listutils:examples storage:
# Add List to the input.
data modify storage listutils:in List set from storage listutils:examples ExampleList
# Call the function.
function listutils:allThis would return 0 in the $listutils.result listutils.out score, because there is an empty string at index 2.