cleanup, docs

This commit is contained in:
root
2026-06-16 12:21:31 +00:00
parent dff1959341
commit ea08d5f28b
296 changed files with 1571 additions and 1940 deletions
+22
View File
@@ -0,0 +1,22 @@
:sig
template<typename F> String StringList::find(F f, String fallback = "") const
:params
f : predicate called with each string
fallback : value returned when no item matches
return value : the first matching string, or `fallback`
:content
Returns the first string in the list that satisfies the predicate. Use it when you need the matching value itself, not just a yes/no answer, and when a clear fallback is better than a separate missing-value branch.
:example
StringList routes = split("dashboard,index,themes", ",");
String route = routes.find([](String item) { return(str_starts_with(item, "them")); }, "missing");
print(route, "\n");
:see
>types
0_StringList
2_StringList_some
2_StringList_every
2_StringList_filter