MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / slice_from_column

Function slice_from_column

crates/opencode-tui/src/ui/selection.rs:165–171  ·  view source on GitHub ↗
(line: &str, start_col: usize)

Source from the content-addressed store, hash-verified

163}
164
165fn slice_from_column(line: &str, start_col: usize) -> String {
166 let start = byte_index_for_column_start(line, start_col);
167 if start >= line.len() {
168 return String::new();
169 }
170 line[start..].to_string()
171}
172
173fn slice_to_column(line: &str, end_col_exclusive: usize) -> String {
174 let end = byte_index_for_column_end(line, end_col_exclusive);

Callers 1

get_selected_textMethod · 0.85

Calls 2

newFunction · 0.85

Tested by

no test coverage detected