MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / StringParseNumber

Function StringParseNumber

netgames/dmfc/dmfcinputcommand.cpp:156–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156bool StringParseNumber(const char *string, int *number, const char **newpos) {
157 char temp[10];
158 bool ret = StringParseWord(string, temp, 10, newpos);
159 if (!ret) {
160 *number = 0;
161 return false;
162 }
163
164 *number = atoi(temp);
165 return true;
166}
167
168// handle the client wishing to change teams
169// Usage: "$team <string team_name>" where team_name is the name of the team you want to change to

Calls 1

StringParseWordFunction · 0.85

Tested by

no test coverage detected