Crate text_utils[][src]

Expand description

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>)

Macros

Structs

Color in rgba format, where {red,green,blue} in 0..255, alpha in 0.0..1.0

A specific emoji.

List of CSS3 named colors from http://www.w3.org/TR/css3-color.

Enums

Error of text progress

Functions

capitalize first letter

Removes common leading whitespace from each line.

Removes at most n leading whitespace from each line

Adds spaces to each non-empty line.

Calculate how much space the first line has

Adds prefix to each non-empty line.

  • Named: eg. slateblue
  • #fff
  • #ff0011
  • rgba(255, 128, 12, 0.5)
  • Parses the given Emoji name into a unicode Emoji.

    Takes in a string with backslash escapes written out with literal backslash characters and converts it to a string with the proper escaped characters.

    unescape \u{xx xx xx}

    unescape \U{xx xx xx}

    unescape_only

    unchecked version of unescape

    unescape_utf8

    url_decode

    url_encode

    Type Definitions

    Result of text progress