There's no hint in documentation of `std.string.wrap` whether it counts the columns by code unit or by code point. Moreover, the function does not even settle on one or the other. Example:
```D
// €€ €€
// €€
//
wrap("€€ €€ €€", 18).writeln;
// €€ €€ €€
//
wrap("€€ €€", 18, "€€ ").writeln;
```
These both should print the same result. While either result will do, I'm inclined to think the result should be the one with all '€':s in the same line. The purpose of the function is to fit characters in a certain space, and characters take the same amount of space regardless of encoding.
Comment #1 by robert.schadek — 2024-12-01T16:40:42Z