20 lines
440 B
Plaintext
20 lines
440 B
Plaintext
:sig
|
|
template<typename F> void StringList::each(F f) const
|
|
|
|
:params
|
|
f : callback called with each string
|
|
return value : none
|
|
|
|
:content
|
|
Calls the callback once for each string in order. Use it when you want side effects such as building output or accumulating a separate value.
|
|
|
|
:example
|
|
StringList items = split("a,b,c", ",");
|
|
items.each([](String item) { print(item, "\n"); });
|
|
|
|
:see
|
|
>types
|
|
0_StringList
|
|
2_StringList_map
|
|
2_StringList_keys
|