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

#1324 in Text processing

Download history 141/week @ 2024-03-13 360/week @ 2024-03-20 198/week @ 2024-03-27 232/week @ 2024-04-03 115/week @ 2024-04-10 129/week @ 2024-04-17 143/week @ 2024-04-24 101/week @ 2024-05-01 96/week @ 2024-05-08 94/week @ 2024-05-15 91/week @ 2024-05-22 111/week @ 2024-05-29 129/week @ 2024-06-05 103/week @ 2024-06-12 116/week @ 2024-06-19 86/week @ 2024-06-26

441 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

~5.5MB
~107K SLoC