// Count the strings (contiguous from index zero) size_t TS_CountStrings(short ID) { StringSetMap::const_iterator setIter = StringSetRoot.find(ID); if (setIter == StringSetRoot.end()) return 0; return setIter->second.size(); }
// Deletes a string, should one ever want to do that void TS_DeleteString(short ID, short Index) { StringSetMap::iterator setIter = StringSetRoot.find(ID); if (setIter == StringSetRoot.end()) return; setIter->second.erase(Index); }
// Returns a pointer to a string; if the ID and the index do not point to a valid string, // this function will then return NULL const char *TS_GetCString(short ID, short Index) { StringSetMap::const_iterator setIter = StringSetRoot.find(ID); if (setIter == StringSetRoot.end()) return NULL; StringSet::const_iterator strIter = setIter->second.find(Index); if (strIter == setIter->second.end()) return NULL; return strIter->second.c_str(); }