fmt() — tailwindcss Function Reference
Architecture documentation for the fmt() function in cursor.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD e65d5b33_8bd8_926c_79f2_661da57817bf["fmt()"] 38e073c3_a357_d869_e8e1_3fb53595a170["cursor.rs"] e65d5b33_8bd8_926c_79f2_661da57817bf -->|defined in| 38e073c3_a357_d869_e8e1_3fb53595a170 style e65d5b33_8bd8_926c_79f2_661da57817bf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/cursor.rs lines 87–116
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let len = self.input.len().to_string();
let pos = format!("{: >len_count$}", self.pos, len_count = len.len());
write!(f, "{}/{} ", pos, len)?;
if self.at_start {
write!(f, "S ")?;
} else if self.at_end {
write!(f, "E ")?;
} else {
write!(f, "M ")?;
}
fn to_str(c: u8) -> String {
if c == 0x00 {
"NUL".into()
} else {
format!("{:?}", escape_default(c).to_string())
}
}
write!(
f,
"[{} {} {}]",
to_str(self.prev),
to_str(self.curr),
to_str(self.next)
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does fmt() do?
fmt() is a function in the tailwindcss codebase, defined in crates/oxide/src/cursor.rs.
Where is fmt() defined?
fmt() is defined in crates/oxide/src/cursor.rs at line 87.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free