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

#1273 in Text processing

Download history 130/week @ 2024-08-26 89/week @ 2024-09-02 108/week @ 2024-09-09 63/week @ 2024-09-16 118/week @ 2024-09-23 99/week @ 2024-09-30 56/week @ 2024-10-07 46/week @ 2024-10-14 65/week @ 2024-10-21 63/week @ 2024-10-28 49/week @ 2024-11-04 55/week @ 2024-11-11 106/week @ 2024-11-18 86/week @ 2024-11-25 89/week @ 2024-12-02 131/week @ 2024-12-09

420 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
~125K SLoC