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

Function getColumnCount

Engine/source/gui/controls/guiPopUpCtrl.cpp:35–56  ·  view source on GitHub ↗

Function to return the number of columns in 'string' given delimeters in 'set'

Source from the content-addressed store, hash-verified

33
34// Function to return the number of columns in 'string' given delimeters in 'set'
35static U32 getColumnCount(const char *string, const char *set)
36{
37 U32 count = 0;
38 U8 last = 0;
39 while(*string)
40 {
41 last = *string++;
42
43 for(U32 i =0; set[i]; i++)
44 {
45 if(last == set[i])
46 {
47 count++;
48 last = 0;
49 break;
50 }
51 }
52 }
53 if(last)
54 count++;
55 return count;
56}
57
58// Function to return the 'index' column from 'string' given delimeters in 'set'
59static const char *getColumn(const char *string, char* returnbuff, U32 index, const char *set)

Callers 2

onRenderCellMethod · 0.70
onRenderMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected