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
  fdb653ea_5c4c_33fb_f2df_fe0e5d2988a1["fmt()"]
  5b7cbbf3_1c2f_dd65_c652_4df368985a7f["fmt()"]
  5b7cbbf3_1c2f_dd65_c652_4df368985a7f -->|calls| fdb653ea_5c4c_33fb_f2df_fe0e5d2988a1
  style fdb653ea_5c4c_33fb_f2df_fe0e5d2988a1 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