// D import file generated from 'source\ecs\string_intern.d' module ecs.string_intern; import ecs.hash_map; import ecs.traits : isForeachDelegateWithI; import std.experimental.allocator; import std.experimental.allocator.mallocator; import std.traits : Parameters; private static __gshared HashMap!(const(char)[], StringIntern) gStringInterns; struct StringIntern { private const(char)* strPtr; this(const(char)[] fromStr) { opAssign(fromStr); } void reset(); size_t length(); const(char)[] str(); const(char)[] cstr(); bool opEquals()(auto ref const StringIntern s) { return strPtr == s.strPtr; } bool opEquals()(auto ref const(char[]) s) { return str() == s; } void opAssign(const(char)[] fromStr); const(char)[] opSlice(); private const(char)[] allocStr(const(char)[] fromStr); }