https://issues.dlang.org/show_bug.cgi?id=17861

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Steven Schveighoffer <[email protected]> ---
std.utf.decode accepts a parameter to allow for exactly what you ask:

import std.utf, std.typecons;

void main()
{
    size_t idx = 0;
    auto x = decode!(Yes.useReplacementDchar)("\xff", idx);
    assert(x == 0xfffd);
}

What is the actual use case you are using the druntime version for?

--

Reply via email to