diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-08-26 17:30:45 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-09-03 23:01:41 -0700 |
| commit | 48615a68fb01d09749a5b73816d45e0d0669d1f9 (patch) | |
| tree | 34a3e32374a5aee3709a2e8947a276d03cfed48f /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 35b14544e1f5dfdbae169eafe34c393c47d7c1ad (diff) | |
| download | rust-48615a68fb01d09749a5b73816d45e0d0669d1f9.tar.gz rust-48615a68fb01d09749a5b73816d45e0d0669d1f9.zip | |
std: Account for CRLF in {str, BufRead}::lines
This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of
the `str::lines` and `BufRead::lines` iterators. Both iterators now account for
`\r\n` sequences in addition to `\n`, allowing for less surprising behavior
across platforms (especially in the `BufRead` case). Splitting *only* on the
`\n` character can still be achieved with `split('\n')` in both cases.
The `str::lines_any` function is also now deprecated as `str::lines` is a
drop-in replacement for it.
[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md
Closes #28032
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
