On Monday, 22 June 2020 at 03:49:01 UTC, Adam D. Ruppe wrote:
On Monday, 22 June 2020 at 03:43:58 UTC, Denis wrote:
My code reads a UTF-8 encoded file into a buffer and validates, byte by byte, the UTF-8 encoding along with some additional validation. If I simply return the UTF-8 encoded string, there won't be another decoding/encoding done -- correct?

Yeah D doesn't do extra work when you are just passing stuff around, only when you specifically ask for it by calling a function or maybe doing foreach (depends on if you ask for char or dchar in the foreach type)

Excellent. I'm trying to make this efficient, so I'm doing all of the validation together, without using any external functions (apart from the buffer reads).

Thanks!

Reply via email to