MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / getUnitCount

Function getUnitCount

engine/source/string/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

setAnimationFramesMethod · 0.85
onTamlCustomReadMethod · 0.85
LogicalPositionMethod · 0.85
tagMethod · 0.85
untagMethod · 0.85
hasTagMethod · 0.85
queryTagsMethod · 0.85
getFieldComponentFunction · 0.85
ConsoleSetTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected