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

Method lookupn

Engine/source/core/stringTable.cpp:187–202  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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