Home / Function/ fmt() — tailwindcss Function Reference

fmt() — tailwindcss Function Reference

Architecture documentation for the fmt() function in cursor.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  36883ed5_a081_7746_7601_837b22364fb9["fmt()"]
  d0560563_e911_804b_f0d7_68235beff16a["fmt()"]
  d0560563_e911_804b_f0d7_68235beff16a -->|calls| 36883ed5_a081_7746_7601_837b22364fb9
  style 36883ed5_a081_7746_7601_837b22364fb9 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

Called By

Frequently Asked Questions

What does fmt() do?
fmt() is a function in the tailwindcss codebase.
What calls fmt()?
fmt() is called by 1 function(s): fmt.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free