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

Function getUnitCount

Engine/source/core/strings/stringUnit.cpp:112–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 }
111
112 U32 getUnitCount(const char *string, const char *set)
113 {
114 U32 count = 0;
115 U8 last = 0;
116 while(*string)
117 {
118 last = *string++;
119
120 for(U32 i =0; set[i]; i++)
121 {
122 if(last == set[i])
123 {
124 count++;
125 last = 0;
126 break;
127 }
128 }
129 }
130 if(last)
131 count++;
132 return count;
133 }
134
135
136 const char* setUnit(const char *string, U32 index, const char *replace, const char *set)

Callers 15

ConsoleSetTypeFunction · 0.85
default_vector_scanFunction · 0.85
default_scanFunction · 0.85
copyFieldsMethod · 0.85
setDependenciesMethod · 0.85
terrImport.cppFile · 0.85
visitMethod · 0.85
visitMethod · 0.85
isReferencedAssetMethod · 0.85
renameDeclaredAssetMethod · 0.85

Calls

no outgoing calls

Tested by 1

constructEditControlMethod · 0.68