Modulesยง
- comment ๐
- Modified from
rustc_ast::util::comments. - inline_
config
Structsยง
Enumsยง
Constantsยง
Functionsยง
- all_
whitespace ๐ - Returns
Noneif the firstcolchars ofscontain a non-whitespace char. Otherwise returnsSome(k)wherekis first char offset after that leading whitespace. Note thatkmay be outside bounds ofs. - estimate_
line_ width - Estimates the display width of a string, accounting for tabs.
- first_
non_ ๐whitespace - Returns
Some(k)wherekis the byte offset of the first non-whitespace char. Returnsk = 0ifsstarts with a non-whitespace char. Ifsonly contains whitespaces, returnsNone. - format_
doc_ ๐block_ comment - Formats a doc block comment line so that they have the
*decorator. - line_
begin_ ๐pos - Returns the
BytePosof the beginning of the current line. - line_
with_ tabs - Normalizes the leading whitespace of a string slice according to a given tab width.
- normalize_
block_ ๐comment_ ws - Returns a slice of
swith a whitespace prefix removed based oncol. If the firstcolchars ofsare all whitespace, returns a slice starting after that prefix.