cleanup, docs
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
:sig
|
||||
template<typename F> bool StringList::every(F f) const
|
||||
|
||||
:params
|
||||
f : predicate called with each string
|
||||
return value : `true` when every item matches
|
||||
|
||||
:content
|
||||
Tests whether all strings in the list satisfy the predicate. Use it for validation checks where a list is acceptable only if every member passes the same rule.
|
||||
|
||||
:example
|
||||
StringList routes = split("dashboard,index,themes", ",");
|
||||
bool all_named = routes.every([](String item) { return(item != ""); });
|
||||
print(all_named ? "all named\n" : "missing name\n");
|
||||
|
||||
:see
|
||||
>types
|
||||
0_StringList
|
||||
2_StringList_some
|
||||
2_StringList_find
|
||||
2_StringList_filter
|
||||
Reference in New Issue
Block a user