MCPcopy Index your code
hub / github.com/NetHack/NetHack / str_end_is

Function str_end_is

src/hacklib.c:240–248  ·  view source on GitHub ↗

determine whether 'str' ends in 'chkstr' */

Source from the content-addressed store, hash-verified

238
239/* determine whether 'str' ends in 'chkstr' */
240boolean
241str_end_is(const char *str, const char *chkstr)
242{
243 int clen = (int) strlen(chkstr);
244
245 if ((int) strlen(str) >= clen)
246 return (boolean) (!strncmp(eos((char *) str) - clen, chkstr, clen));
247 return FALSE;
248}
249
250/* return max line length from buffer comprising newline-separated strings */
251int

Callers 2

can_append_textFunction · 0.85
fruitaddFunction · 0.85

Calls 1

eosFunction · 0.85

Tested by

no test coverage detected