Modulesยง
- comment ๐
- Modified from
rustc_ast::util::comments
. - inline_
config
Structsยง
Enumsยง
Constantsยง
Functionsยง
- all_
whitespace ๐ - Returns
None
if the firstcol
chars ofs
contain a non-whitespace char. Otherwise returnsSome(k)
wherek
is first char offset after that leading whitespace. Note thatk
may be outside bounds ofs
. - first_
non_ ๐whitespace - Returns
Some(k)
wherek
is the byte offset of the first non-whitespace char. Returnsk = 0
ifs
starts with a non-whitespace char. Ifs
only contains whitespaces, returnsNone
. - format_
doc_ ๐block_ comment - Formats a doc block comment line so that they have the
*
decorator. - line_
begin_ ๐pos - Returns the
BytePos
of 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
s
with a whitespace prefix removed based oncol
. If the firstcol
chars ofs
are all whitespace, returns a slice starting after that prefix.