pub fn csharp_type_name(name: &str) -> StringExpand description
Apply C# initialism handling to a name that is already in PascalCase (e.g. an IR type name).
IR type names come directly from Rust PascalCase (e.g. GraphQLRouteConfig, HttpStatus).
When such names have been processed by heck::ToPascalCase they may lose initialism
capitalisation for the names we explicitly preserve (e.g. GraphQLRouteConfig →
GraphQlRouteConfig). This function restores them.
Examples:
GraphQlRouteConfig→GraphQLRouteConfigGraphQLRouteConfig→GraphQLRouteConfig(idempotent)HttpStatus→HttpStatus(left alone —Httpnot inCSHARP_INITIALISMS)