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

#1233 in Text processing

Download history 136/week @ 2024-07-21 131/week @ 2024-07-28 92/week @ 2024-08-04 120/week @ 2024-08-11 91/week @ 2024-08-18 114/week @ 2024-08-25 106/week @ 2024-09-01 104/week @ 2024-09-08 69/week @ 2024-09-15 106/week @ 2024-09-22 111/week @ 2024-09-29 59/week @ 2024-10-06 40/week @ 2024-10-13 61/week @ 2024-10-20 72/week @ 2024-10-27 49/week @ 2024-11-03

227 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

~6.5MB
~124K SLoC