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

Function getColumnCount

Engine/source/gui/controls/guiPopUpCtrlEx.cpp:58–79  ·  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

56
57// Function to return the number of columns in 'string' given delimeters in 'set'
58static U32 getColumnCount(const char *string, const char *set)
59{
60 U32 count = 0;
61 U8 last = 0;
62 while(*string)
63 {
64 last = *string++;
65
66 for(U32 i =0; set[i]; i++)
67 {
68 if(last == set[i])
69 {
70 count++;
71 last = 0;
72 break;
73 }
74 }
75 }
76 if(last)
77 count++;
78 return count;
79}
80
81// Function to return the 'index' column from 'string' given delimeters in 'set'
82static 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