The `= [...]` initializer signature used by extractVariable (its `.length >= 100` check fires exactly when the slice hit the cap).
(value_text: &str)
| 148 | /// extractVariable (its `.length >= 100` check fires exactly when the slice |
| 149 | /// hit the cap). |
| 150 | pub fn init_signature(value_text: &str) -> String { |
| 151 | let (sliced, _) = slice_utf16(value_text, 100); |
| 152 | if utf16_len(&sliced) >= 100 { |
| 153 | format!("= {sliced}...") |
| 154 | } else { |
| 155 | format!("= {sliced}") |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | #[cfg(test)] |
| 160 | mod tests { |