fmt() — tailwindcss Function Reference
Architecture documentation for the fmt() function in cursor.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 1d6dc5c3_0465_430b_df11_e33a5210a917["fmt()"] 3d889371_52ae_87e1_810f_7e71098819d9["cursor.rs"] 1d6dc5c3_0465_430b_df11_e33a5210a917 -->|defined in| 3d889371_52ae_87e1_810f_7e71098819d9 style 1d6dc5c3_0465_430b_df11_e33a5210a917 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