mangle

Mangles a D symbol.

@safe pure nothrow
char[]
mangle
(
T
)
(
const(char)[] fqn
,
char[] dst = null
)

Parameters

T

The type of the symbol.

fqn
Type: const(char)[]

The fully qualified name of the symbol.

dst
Type: char[]

An optional destination buffer.

Return Value

Type: char[]

The mangled name for a symbols of type T and the given fully qualified name.

Examples

assert(mangle!int("a.b") == "_D1a1bi");
assert(mangle!(char[])("test.foo") == "_D4test3fooAa");
assert(mangle!(int function(int))("a.b") == "_D1a1bPFiZi");
Suggestion Box / Bug Report