Signature
templatebool StringList::some(F f) const
Parameters
f : predicate called with each string
return value :
true when at least one item matchesTests whether any string in the list satisfies the predicate. Use it for concise presence checks when the condition is more specific than direct equality.
Example
StringList routes = split("dashboard,index,themes", ",");
bool has_index = routes.some([](String item) { return(item == "index"); });
print(has_index ? "yes\n" : "no\n");
Output
yes