Function to return the number of columns in 'string' given delimeters in 'set'
| 56 | |
| 57 | // Function to return the number of columns in 'string' given delimeters in 'set' |
| 58 | static 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' |
| 82 | static const char *getColumn(const char *string, char* returnbuff, U32 index, const char *set) |
no outgoing calls
no test coverage detected