MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / lookupn

Method lookupn

Engine/source/core/stringTable.cpp:188–203  ·  view source on GitHub ↗

--------------------------------------

Source from the content-addressed store, hash-verified

186
187//--------------------------------------
188StringTableEntry _StringTable::lookupn(const char* val, S32 len, const bool caseSens)
189{
190 PROFILE_SCOPE(StringTableLookupN);
191
192 Node **walk, *temp;
193 U32 key = hashStringn(val, len);
194 walk = &buckets[key % numBuckets];
195 while((temp = *walk) != NULL) {
196 if(caseSens && !dStrncmp(temp->val, val, len) && temp->val[len] == 0)
197 return temp->val;
198 else if(!caseSens && !dStrnicmp(temp->val, val, len) && temp->val[len] == 0)
199 return temp->val;
200 walk = &(temp->next);
201 }
202 return NULL;
203}
204
205//--------------------------------------
206void _StringTable::resize(const U32 _newSize)

Callers 2

findObjectMethod · 0.80
findObjectFunction · 0.80

Calls 2

dStrncmpFunction · 0.85
dStrnicmpFunction · 0.85

Tested by

no test coverage detected