Extract the indentation (leading whitespace) of the line at `offset`.
(content: &str, offset: usize)
| 866 | |
| 867 | /// Extract the indentation (leading whitespace) of the line at `offset`. |
| 868 | fn indent_at(content: &str, offset: usize) -> String { |
| 869 | let line_start = find_line_start(content, offset); |
| 870 | let rest = &content[line_start..]; |
| 871 | rest.chars().take_while(|c| c.is_whitespace()).collect() |
| 872 | } |
| 873 | |
| 874 | // ─── Code generation ──────────────────────────────────────────────────────── |
| 875 |
no test coverage detected