removeFunction

Removes a function provided that it exists.

@safe
bool
removeFunction
(
in dstring name
,
in dstring func
)

Parameters

name dstring

The function name.

func dstring

The function parameters and return type.

Return Value

Type: bool

Whether the function exists or not.

Examples

dstring func = "(Number,Number)(Number)d";
dstring def = "x1*x2"d;
dstring name = "f"d;
assert(registerFunction(name, func, def)); //Valid, a different function under the same name is a different function in the library's eyes.
assert(removeFunction(name, func));
assert(!removeFunction(name, func)); //Cannot remove a non-existent function.

Meta