Home / Function/ move_to() — tailwindcss Function Reference

move_to() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b545b64e_05a4_16aa_f6bd_dc5552bae494["move_to()"]
  3d889371_52ae_87e1_810f_7e71098819d9["cursor.rs"]
  b545b64e_05a4_16aa_f6bd_dc5552bae494 -->|defined in| 3d889371_52ae_87e1_810f_7e71098819d9
  c52616a6_c876_2125_b7f3_d667940a6a11["new()"]
  c52616a6_c876_2125_b7f3_d667940a6a11 -->|calls| b545b64e_05a4_16aa_f6bd_dc5552bae494
  35afea5f_3812_945e_174e_7962259eb013["advance_by()"]
  35afea5f_3812_945e_174e_7962259eb013 -->|calls| b545b64e_05a4_16aa_f6bd_dc5552bae494
  style b545b64e_05a4_16aa_f6bd_dc5552bae494 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/cursor.rs lines 72–83

    pub fn move_to(&mut self, pos: usize) {
        let len = self.input.len();
        let pos = pos.clamp(0, len);

        self.pos = pos;
        self.at_start = pos == 0;
        self.at_end = pos + 1 >= len;

        self.prev = *self.input.get(pos.wrapping_sub(1)).unwrap_or(&0x00u8);
        self.curr = *self.input.get(pos).unwrap_or(&0x00u8);
        self.next = *self.input.get(pos.saturating_add(1)).unwrap_or(&0x00u8);
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does move_to() do?
move_to() is a function in the tailwindcss codebase, defined in crates/oxide/src/cursor.rs.
Where is move_to() defined?
move_to() is defined in crates/oxide/src/cursor.rs at line 72.
What calls move_to()?
move_to() is called by 2 function(s): advance_by, new.

Analyze Your Own Codebase

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

Try Supermodel Free