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
+11 -8
View File
@@ -2,16 +2,19 @@
template<typename F> StringList StringList::map(F f) const
:params
f : mapper called with each String
f : mapper called with each string
return value : new list of mapped strings
:content
Returns a new `StringList` containing the mapper result for each item, in the same order. Use it for simple string transformations while keeping list shape.
:example
StringList names = split("ada,grace", ",");
StringList upper = names.map([](String item) { return(to_upper(item)); });
print(join(upper, ","), "\n");
:see
>types
0_StringList
2_StringList_filter
:content
Returns a new `StringList` containing the mapper result for each item, in the same order.
```cpp
StringList upper = names.map([](String s) { return(to_upper(s)); });
```
2_StringList_each