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

Function getColumn

Engine/source/gui/controls/guiPopUpCtrl.cpp:59–78  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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)
60{
61 U32 sz;
62 while(index--)
63 {
64 if(!*string)
65 return "";
66 sz = dStrcspn(string, set);
67 if (string[sz] == 0)
68 return "";
69 string += (sz + 1);
70 }
71 sz = dStrcspn(string, set);
72 if (sz == 0)
73 return "";
74 char *ret = returnbuff;
75 dStrncpy(ret, string, sz);
76 ret[sz] = '\0';
77 return ret;
78}
79
80GuiPopUpBackgroundCtrl::GuiPopUpBackgroundCtrl(GuiPopUpMenuCtrl *ctrl, GuiPopupTextListCtrl *textList)
81{

Callers 8

onRenderCellMethod · 0.70
onRenderMethod · 0.70
isAffineMethod · 0.50
getColumn4FMethod · 0.50
getColumn3FMethod · 0.50
getForwardVectorMethod · 0.50
getRightVectorMethod · 0.50
getUpVectorMethod · 0.50

Calls 2

dStrcspnFunction · 0.85
dStrncpyFunction · 0.85

Tested by

no test coverage detected