MCPcopy Create free account
hub / github.com/GCWing/BitFun / char_to_byte

Method char_to_byte

src/apps/cli/src/ui/command_palette.rs:761–767  ·  view source on GitHub ↗
(&self, char_idx: usize)

Source from the content-addressed store, hash-verified

759 // ── Helpers ──
760
761 fn char_to_byte(&self, char_idx: usize) -> usize {
762 self.search_input
763 .char_indices()
764 .nth(char_idx)
765 .map(|(i, _)| i)
766 .unwrap_or(self.search_input.len())
767 }
768}

Callers 2

handle_key_eventMethod · 0.45
renderMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected