The `= [...]` initializer signature used by extractVariable (its `.length >= 100` check fires exactly when the slice hit the cap).
(value_text: &str)
| 200 | /// extractVariable (its `.length >= 100` check fires exactly when the slice |
| 201 | /// hit the cap). |
| 202 | pub fn init_signature(value_text: &str) -> String { |
| 203 | let (sliced, _) = slice_utf16(value_text, 100); |
| 204 | if utf16_len(&sliced) >= 100 { |
| 205 | format!("= {sliced}...") |
| 206 | } else { |
| 207 | format!("= {sliced}") |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | #[cfg(test)] |
| 212 | mod tests { |