Bug 10654 – std.string.outdent() wrongly manages Windows newlines, and it isn't pure nothrow

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-07-16T16:12:56Z
Last change time
2024-12-01T16:18:19Z
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: phobos#9991 →

Comments

Comment #0 by bearophile_hugs — 2013-07-16T16:12:56Z
If I save this program on Windows (with the typical newlines used on Windows): import std.stdio: writeln; import std.string: outdent; string foo() /*pure nothrow*/ { return q{ first line second line third line }.outdent; } void main() { writeln(foo()); } It outputs double newlines: first line second line third line Also std.string.outdent() is not pure nor nothrow.
Comment #1 by robert.schadek — 2024-12-01T16:18:19Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9991 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB