string_for_each(fn, s1, @rest, ...)
The function fn
is called for each character in the strings
s1, ...
.
Return void
.
Fn
should accept as many arguments as there are strings. It is called only for its side-effect.
let (s = make_string(10), i = 0)
{ string_for_each(^(c, d) { string_set(s, i, c)
string_set(s, i + 1, d)
i = i + 2 },
"hello", "world")
s }
// hweolrllod