Skip to content

Commit ebea47d

Browse files
authored
show that chomp doesn't remove spaces in example
It was written in the docs, but I think the example shows it more clearly and doesn't require the user to test it if in doubt anymore.
1 parent 7efbb97 commit ebea47d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std/string.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3815,6 +3815,7 @@ unittest
38153815
assert(chomp(" hello world \n\n" ~ [lineSep]) == " hello world \n\n");
38163816
assert(chomp(" hello world \n\n" ~ [paraSep]) == " hello world \n\n");
38173817
assert(chomp(" hello world \n\n" ~ [ nelSep]) == " hello world \n\n");
3818+
assert(chomp(" hello world ") == " hello world ");
38183819
assert(chomp(" hello world") == " hello world");
38193820
assert(chomp("") == "");
38203821

0 commit comments

Comments
 (0)