Module string

Source

Structsยง

StringFormat ๐Ÿ”’
Describes the layout of a piece of text.

Enumsยง

SnippetState ๐Ÿ”’
Result of breaking a string so it fits in a line and the state it ended in. The state informs about what to do with the snippet and how to continue the breaking process.

Constantsยง

MIN_STRING ๐Ÿ”’

Functionsยง

break_string ๐Ÿ”’
Break the input string at a boundary character around the offset max_width. A boundary character is either a punctuation or a whitespace. FIXME(issue#3281): We must follow UAX#14 algorithm instead of this.
detect_url ๐Ÿ”’
Returns the index to the end of the URL if the split at index of the given string includes a URL or alike. Otherwise, returns None.
graphemes_width ๐Ÿ”’
is_new_line ๐Ÿ”’
is_part_of_type ๐Ÿ”’
is_punctuation ๐Ÿ”’
is_valid_linebreak ๐Ÿ”’
is_whitespace ๐Ÿ”’
not_whitespace_except_line_feed ๐Ÿ”’
rewrite_string ๐Ÿ”’
trim_end_but_line_feed ๐Ÿ”’
Trims whitespaces to the right except for the line feed character.