The `= [...]` initializer signature used by extractVariable (its `.length >= 100` check fires exactly when the slice hit the cap).
(value_text: &str)
| 244 | /// extractVariable (its `.length >= 100` check fires exactly when the slice |
| 245 | /// hit the cap). |
| 246 | pub fn init_signature(value_text: &str) -> String { |
| 247 | let (sliced, _) = slice_utf16(value_text, 100); |
| 248 | if utf16_len(&sliced) >= 100 { |
| 249 | format!("= {sliced}...") |
| 250 | } else { |
| 251 | format!("= {sliced}") |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | #[cfg(test)] |
| 256 | mod tests { |