UCE Docs / StringList::each

Signature

template void StringList::each(F f) const

Parameters

f : callback called with each string
return value : none

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"); });
Output
a
b
c