The issue is that strings aren't input ranges in betterC [1],
due to autodecoding.
Normally you'd work around this using std.utf.byCodeUnit, but
that's currently broken, because std.utf attempts to import
core.exception.UnicodeException from druntime at module scope
[2], causing any betterC program that imports std.utf to fail
compilation.
So, for now, I think the best you can do is probably to
copy-paste byCodeUnit into its own source file, and use that
until std.utf is fixed.
[1] https://issues.dlang.org/show_bug.cgi?id=20139
[2]
https://github.com/dlang/phobos/blob/7a656e09d23507d0c404dabaa2c440a45e7c753d/std/utf.d#L65
Oh right, thanks!
Its the third time that autodecoding bite me in betterC and i
always forgot of the possibility.