November 15, 2022 [Issue 23489] New: std.format.sformat mishandles wchar ranges | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23489 Issue ID: 23489 Summary: std.format.sformat mishandles wchar ranges Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: ag0aep6g@gmail.com Similar to issue 23488, but less urgent for me because I don't use wchars. struct R { wstring s = "😈"; bool empty() { return s.length == 0; } wchar front() { return s[0]; } void popFront() { s = s[1 .. $]; } } void main() { import std.format: sformat; char[4] buf; assert(sformat(buf, "%s", R()) == "😈"); /* fails; should pass */ } -- |
Copyright © 1999-2021 by the D Language Foundation