Module rustfmt_nightly::string
source ยท Structsยง
- String
Format ๐Describes the layout of a piece of text.
Enumsยง
- Snippet
State ๐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 offsetmax_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, returnsNone
. - graphemes_
width ๐ - is_
new_ ๐line - is_
part_ ๐of_ type - is_
punctuation ๐ - is_
valid_ ๐linebreak - is_
whitespace ๐ - rewrite_
string ๐ - Trims whitespaces to the right except for the line feed character.