Skip to content

Demangle

Spice
import "std/text/demangle";

Functions

demangle

Spice
public f<String> demangle(const String& mangled)

Turns a mangled Spice symbol name back into a readable signature, e.g. '_ZN13ArrayIteratorIiE3getEv' into 'ArrayIterator.get()'.

Also understands the vtable and type info symbols ('vtable for Car'), and the '.fatthunk' suffix that lambda fat-pointer thunks carry.

Parameters

Name Type Description
mangled const String& Mangled name, as it appears on the ABI level

Returns: String — Demangled signature, or the input unchanged if it is not a mangled Spice name or does not parse

demangle

Spice
public f<String> demangle(string mangled)

Convenience overload for a raw string. See the String overload above.

Parameters

Name Type Description
mangled string

Returns: String