The OpenD Programming Language

makeTrans

Do same thing as makeTransTable but allocate the translation table on the GC heap.

Use makeTransTable instead.

@trusted pure nothrow
string
makeTrans
(
scope const(char)[] from
,
scope const(char)[] to
)

Examples

auto transTable1 = makeTrans("eo5", "57q");
assert(translate("hello world", transTable1) == "h5ll7 w7rld");

assert(translate("hello world", transTable1, "low") == "h5 rd");

Meta