# core.demangle

The demangle module converts mangled D symbols to a representation similar to what would have existed in code.
License:
Distributed under the Boost Software License 1.0. (See accompanying file LICENSE)
Authors:
Sean Kelly
Source:

char[] demangle(const(char)[] buf, char[] dst = null);
  Demangles D mangled names. If it is not a D mangled name, it returns its argument name.
  Params:

  const(char)[] buf | The string to demangle.
  char[] dst | An optional destination buffer.

  Returns:
  The demangled name or the original string if the name is not a mangled D name.
char[] demangleType(const(char)[] buf, char[] dst = null);
  Demangles a D mangled type.
  Params:

  const(char)[] buf | The string to demangle.
  char[] dst | An optional destination buffer.

  Returns:
  The demangled type name or the original string if the name is not a mangled D type.
pure nothrow @safe char[] mangle(T)(const(char)[] fqn, char[] dst = null);
  Mangles a D symbol.
  Params:

  T | The type of the symbol.
  const(char)[] fqn | The fully qualified name of the symbol.
  char[] dst | An optional destination buffer.

  Returns:
  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");

pure nothrow @safe char[] mangleFunc(T : FT*, FT)(const(char)[] fqn, char[] dst = null) if (is(FT == function));
  Mangles a D function.
  Params:

  T | function pointer type.
  const(char)[] fqn | The fully qualified name of the symbol.
  char[] dst | An optional destination buffer.

  Returns:
  The mangled name for a function with function pointer type T and the given fully qualified name.
  Examples:

      assert(mangleFunc!(int function(int))("a.b") == "_D1a1bFiZi");
      assert(mangleFunc!(int function(Object))("object.Object.opEquals") == "_D6object6Object8opEqualsFC6ObjectZi");

Page generated by Ddoc. Copyright Sean Kelly 2010 - 2014.