Mojo function
get_type_name
get_type_name[type_type: AnyTrivialRegType, //, type: type_type, *, qualified_builtins: Bool = False]() -> StringSlice[StaticConstantOrigin]
Returns the struct name of the given type parameter.
Parameters:
- type_type (
AnyTrivialRegType
): Type of type. - type (
type_type
): A mojo type. - qualified_builtins (
Bool
): Whether to print fully qualified builtin type names (e.g.stdlib.builtin.int.Int
) or shorten them (e.g.Int
).
Returns:
StringSlice
: Type name.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!