Returns index of argument sought, or 0 if not found
| 124 | |
| 125 | // Returns index of argument sought, or 0 if not found |
| 126 | int FindArgChar(const char *which, char singleCharArg) { |
| 127 | for (int i = 1; i <= TotalArgs; i++) { |
| 128 | char *str = GameArgs[i]; |
| 129 | if (str[0] == '-' && str[1] == singleCharArg && str[2] == '\0') { |
| 130 | mprintf(0, "FindArg: Found [-%c] at argument index (%d).", singleCharArg, i); |
| 131 | return i; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | return FindArg(which); |
| 136 | } |
no test coverage detected