Capy-Bearer Documentation

Test any string

lib call

Capy

function some(items : dval, predicate : function(value : string) bool) bool

Description

some tests each string in a list-shaped dval with predicate.

This function does not change items.

Return Values

This function returns true when any item matches. It returns false for an empty list.

Example

Capy

var items := split("one,two", ",")
print(some(items, function(value : string) bool { return value == "two" }), "\n")