public string intern(const(ubyte)[] str) pure nothrow @safe
Caches a string.

public string intern(string str) pure nothrow @trusted
Caches a string.

public string intern(const(ubyte)[] str, uint hash) pure nothrow @safe
Caches a string as above, but uses the given hash code instead of calculating one itself. Use this alongside hashStep() can reduce the amount of work necessary when lexing dynamic tokens.

Contracts

in
{
    assert (str.length > 0);
}