Expand description
Defines functions for string creation/manipulation.
Functions§
- build_
filename_ and_ sanitize - Builds a filename from a file stem and extension and sanitizes the output string.
- convert_
all_ to_ ascii - Converts all Unicode characters to their ASCII equivalent.
- convert_
symbols_ to_ ascii - Converts a subset of “smart” Unicode symbols to their ASCII equivalents.
- extract_
tags - Extracts all
#tags
from a string. - normalize_
whitespace - Trims whitespace and replaces all linebreaks with:
\n\n
. - remove_
tags - Removes all
#tags
from a string. - render_
and_ sanitize - Renders a one-off template string with a context and sanitizes the output string.
- sanitize
- Removes/replaces problematic characters from a string.
- strip
- Strips a string of a set of characters.
- to_slug
- Slugifies a string.
- to_
slug_ date - Slugifies a date.
- trim_
blocks - Normalizes linebreaks by replacing three or more consecutive linebreaks with two consecutive linebreaks while leaving a single trailing linebreak.