View on GitHub

DSFML

dsfml.system.string

A module containing functions for interacting with strings going to and from a C/C++ library as well as converting between D's string types. This module has no dependencies except for std.utf.

pure immutable(T)[] toString(T)(in const(T)* str) if (is(T == dchar) || is(T == wchar) || is(T == char));
Returns a D string copy of a zero terminated C style string

Params:
const(T)* str The C style string to convert.

Returns:
the D style string copy.

nothrow const(T)* toStringz(T)(in immutable(T)[] str) if (is(T == dchar) || is(T == wchar) || is(T == char));
Returns a pointer to a C style string created from a D string type

Params:
immutable(T)[] str The D style string to convert.

Returns:
the C style string pointer.

pure immutable(U)[] stringConvert(T, U)(in immutable(T)[] str) if ((is(T == dchar) || is(T == wchar) || is(T == char)) && (is(U == dchar) || is(U == wchar) || is(U == char)));
Returns the same string in a different utf encoding

Params:
immutable(T)[] str The string to convert.

Returns:
the C style string pointer.