3 ms·
I don't see the difference here. D offers the same options when processing a string.
by WalterBright 4y ago
I don't see the difference here. D offers the same options when processing a string.
- wtetzner 4y agoI think the point is that you run the unicode validation once on your [u8] array, which gives you a &str (or String for the lossy variants). From then on, you know you have valid unicode and don't need to keep checking.
- tialaramex 4y agoThat's surely the whole point, every D std.string function is also a string decoder with varying features. But a suitably decoded "string" is still just the same type, whereas Rust has a distinct type for actual UTF8 strings