StringCache

The string cache is used for string interning.

It will only store a single copy of any string that it is asked to hold. Interned strings can be compared for equality by comparing their .ptr field.

Default and postbilt constructors are disabled. When a StringCache goes out of scope, the memory held by it is freed.

Constructors

this
this()
Undocumented in source.
this
this(size_t bucketCount)

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

freeItAll
void freeItAll()
Undocumented in source. Be warned that the author may not have intended to support it.
intern
string intern(const(ubyte)[] str)
string intern(string str)

Caches a string.

Static variables

defaultBucketCount
enum defaultBucketCount;

The default bucket count for the string cache.

See Also

Meta