Function to return the 'index' column from 'string' given delimeters in 'set'
| 57 | |
| 58 | // Function to return the 'index' column from 'string' given delimeters in 'set' |
| 59 | static 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 | |
| 80 | GuiPopUpBackgroundCtrl::GuiPopUpBackgroundCtrl(GuiPopUpMenuCtrl *ctrl, GuiPopupTextListCtrl *textList) |
| 81 | { |
no test coverage detected