StringCache.intern

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.

  1. string intern(const(ubyte)[] str)
  2. string intern(string str)
  3. string intern(const(ubyte)[] str, uint hash)
    struct StringCache
    pure nothrow @safe
    string
    intern
    (
    const(ubyte)[] str
    ,
    uint hash
    )

Meta