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

Function getColumn

Engine/source/gui/controls/guiPopUpCtrlEx.cpp:82–101  ·  view source on GitHub ↗

Function to return the 'index' column from 'string' given delimeters in 'set'

Source from the content-addressed store, hash-verified

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)
83{
84 U32 sz;
85 while(index--)
86 {
87 if(!*string)
88 return "";
89 sz = dStrcspn(string, set);
90 if (string[sz] == 0)
91 return "";
92 string += (sz + 1);
93 }
94 sz = dStrcspn(string, set);
95 if (sz == 0)
96 return "";
97 char *ret = returnbuff;
98 dStrncpy(ret, string, sz);
99 ret[sz] = '\0';
100 return ret;
101}
102
103GuiPopUpBackgroundCtrlEx::GuiPopUpBackgroundCtrlEx(GuiPopUpMenuCtrlEx *ctrl, GuiPopupTextListCtrlEx *textList)
104{

Callers 2

onRenderCellMethod · 0.70
onRenderMethod · 0.70

Calls 2

dStrcspnFunction · 0.85
dStrncpyFunction · 0.85

Tested by

no test coverage detected