13 releases

0.4.3 Dec 26, 2021
0.4.2 Dec 26, 2021
0.3.1 Dec 25, 2021
0.3.0 Nov 1, 2020
0.1.0 Mar 10, 2020

#1687 in Text processing

Download history 76/week @ 2023-11-19 82/week @ 2023-11-26 93/week @ 2023-12-03 104/week @ 2023-12-10 75/week @ 2023-12-17 61/week @ 2023-12-24 56/week @ 2023-12-31 97/week @ 2024-01-07 66/week @ 2024-01-14 74/week @ 2024-01-21 61/week @ 2024-01-28 59/week @ 2024-02-04 107/week @ 2024-02-11 102/week @ 2024-02-18 132/week @ 2024-02-25 113/week @ 2024-03-03

466 downloads per month
Used in 17 crates (5 directly)

MPL-2.0 license

12KB
228 lines

Text Toolbox

All designs only consider spaces and carriage returns, so sorry for Tab and CRLF.

All interfaces are function calls instead of traits.

Most interfaces return String instead of Cow<str>

Functions

Escaping

  • unescape:
  • unescape_utf8:
  • unescape_only:
  • url_encode: encoding strings with %
  • url_decode: decoding strings of %

Align

  • indent: adds spaces to each non-empty line
  • indent_with: adds prefix to each non-empty line
  • indent_count:
  • dedent: removes leading whitespace from each line
  • dedent_less_than: removes at most n leading whitespace from each line

Table


lib.rs:

Text utility function library

Interface

This library is biased towards input strings and returns new strings This library uses polymorphic interface

  • if accept String, use (impl Into<String>)
  • if accept &str, use (impl AsRef<str>)

Dependencies

~5MB
~106K SLoC