MCPcopy Create free account
hub / github.com/NetHack/NetHack / stripdigits

Function stripdigits

src/hacklib.c:520–531  ·  view source on GitHub ↗

remove digits from string */

Source from the content-addressed store, hash-verified

518
519/* remove digits from string */
520char *
521stripdigits(char *s)
522{
523 char *s1, *s2;
524
525 for (s1 = s2 = s; *s1; s1++)
526 if (*s1 < '0' || *s1 > '9')
527 *s2++ = *s1;
528 *s2 = '\0';
529
530 return s;
531}
532
533/* substitute a word or phrase in a string (in place);
534 caller is responsible for ensuring that bp points to big enough buffer */

Callers 1

mapfrag_fromstrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected