3 releases

Uses old Rust 2015

0.1.2 Mar 11, 2022
0.1.1 Sep 7, 2018
0.1.0 Sep 7, 2018

#1133 in Text processing

Download history 378/week @ 2023-01-24 627/week @ 2023-01-31 391/week @ 2023-02-07 582/week @ 2023-02-14 767/week @ 2023-02-21 1965/week @ 2023-02-28 672/week @ 2023-03-07 694/week @ 2023-03-14 842/week @ 2023-03-21 633/week @ 2023-03-28 570/week @ 2023-04-04 1454/week @ 2023-04-11 689/week @ 2023-04-18 511/week @ 2023-04-25 680/week @ 2023-05-02 333/week @ 2023-05-09

2,335 downloads per month
Used in 10 crates (5 directly)

BSD-2-Clause

7KB
201 lines

Efficiently split lines by whitespace, while handling the backslash escape sequences in Rust-like string format.

For example, if you had a string like:

  One\ two three\ four

Naïve splitting on whitespace would produce four outputs:

  • One\
  • two
  • three\
  • four

This crate will instead produce two strings:

  • One two
  • three four

This crate also handles special escape sequences like "\n", which represents a newline. Specifically, the escape sequences are:

  • \a
  • \b
  • \t
  • \n
  • \v
  • \f
  • \r
  • \\

If the backslash character is found, but the successive character is not special, then the backslash is disregarded and the successive character is included verbatim.

No runtime deps