std::str::Lines strips bare carriage return from end of string #106258
Labels
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
According to the documentation of
std::string::Lines
,By my reading of these rules, a bare carriage return at the end of a string ought to be preserved, because a bare carriage return is not a line ending. That is, I expect the following:
In fact, this second assertion fails. The actual result is that
lines[1] == "two"
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: