The `new ns.Foo ()` name normalization shared by instantiation / anonymous-class extraction: strip `<...` from the first `<` (index > 0), keep the segment after the last `.`/`::`, strip ONE leading `:` or `.`, trim. (The vbnet paren strip in the TS path is vbnet-gated — inert here.)
(raw: &str)
| 1582 | /// keep the segment after the last `.`/`::`, strip ONE leading `:` or `.`, |
| 1583 | /// trim. (The vbnet paren strip in the TS path is vbnet-gated — inert here.) |
| 1584 | fn strip_generic_and_qualifier(raw: &str) -> String { |
| 1585 | let mut name = raw.to_string(); |
| 1586 | if let Some(lt) = name.find('<') { |
| 1587 | if lt > 0 { |
| 1588 | name.truncate(lt); |
| 1589 | } |
| 1590 | } |
| 1591 | let last_dot = name |
| 1592 | .rfind('.') |
| 1593 | .map(|i| i as isize) |
| 1594 | .unwrap_or(-1) |
| 1595 | .max(name.rfind("::").map(|i| i as isize).unwrap_or(-1)); |
| 1596 | if last_dot >= 0 { |
| 1597 | name = name[(last_dot as usize + 1)..].to_string(); |
| 1598 | if name.starts_with(':') || name.starts_with('.') { |
| 1599 | name.remove(0); |
| 1600 | } |
| 1601 | } |
| 1602 | name.trim().to_string() |
| 1603 | } |
| 1604 | |
| 1605 | fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef { |
| 1606 | match s { |
no outgoing calls
no test coverage detected