On Saturday, 7 December 2019 at 03:23:00 UTC, Jonathan M Davis wrote:
The module to look at here is std.utf, not std.encoding.

Hmmm, docs may need updating then -- several functions in `std.encoding` explicitly state they are replacements for `std.utf`. Did you mean `std.uni`?

It is honestly a bit confusing which of these 3 modules to use, especially as they each offer different (and useful) tools. For example, `std.utf.validate` is less useful than `std.encoding.isValid`, because it throws rather than returning a bool and giving the user the choice of behaviour. `std.uni` doesn't seem to have any equivalent for either.

Thanks in any case for the as-ever characteristically detailed and useful advice :-)

Reply via email to