Documentation

countlist

Syntax: %countlist(list)

Count the number of times each item appears in a string list and return a database record with the items as key properties, and the count of each item as the value of the key.

Examples:

#VAR ToDo {kill orc|kill goblin|kill orc}
#VAR ToDo %countlist(@ToDo)
#LOOPDB @ToDo {#SHOW %key %val}


displays:

kill orc 2
kill goblin 1

Add comment

Login or register to post comments