www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23298] New: std.string wrap wraps early

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

          Issue ID: 23298
           Summary: std.string wrap wraps early
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: Bastiaan Veelo.net

Something strange is going on here:

```d
import std;
void main()
{
    writeln("1 2 3 4 5 6 7 8 9".wrap(17));  // Two lines, should be one
    writeln("1 2 3 4 5 6 7 8 9 ".wrap(17)); // One line
}
```

Version 2.099.

--
Aug 19 2022