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

Method caseConv

Engine/source/core/tSimpleHashTable.h:47–65  ·  view source on GitHub ↗

[tom, 9/21/2006] This is incredibly lame and adds a pretty big speed penalty

Source from the content-addressed store, hash-verified

45
46 // [tom, 9/21/2006] This is incredibly lame and adds a pretty big speed penalty
47 inline const char *caseConv(const char *str)
48 {
49 if(mCaseSensitive) return str;
50
51 S32 len = dStrlen(str);
52 if(len >= sizeof(mCaseConvBuf)) len = sizeof(mCaseConvBuf) - 1;
53
54 char *dptr = mCaseConvBuf;
55 const char *sptr = str;
56 while(*sptr)
57 {
58 *dptr = dTolower(*sptr);
59 ++sptr;
60 ++dptr;
61 }
62 *dptr = 0;
63
64 return mCaseConvBuf;
65 }
66
67public:
68 SimpleHashTable(const U32 modulusSize = 64, bool caseSensitive = true) : Parent(modulusSize), mCaseSensitive(caseSensitive)

Callers

nothing calls this directly

Calls 2

dTolowerFunction · 0.85
dStrlenFunction · 0.50

Tested by

no test coverage detected