MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / ends_with

Function ends_with

modules/http2d/server.c:339–345  ·  view source on GitHub ↗

Returns nonzero if the string |s| ends with the substring |sub| */

Source from the content-addressed store, hash-verified

337
338/* Returns nonzero if the string |s| ends with the substring |sub| */
339static int ends_with(const char *s, const char *sub) {
340 size_t slen = strlen(s);
341 size_t sublen = strlen(sub);
342 if (slen < sublen)
343 return 0;
344 return memcmp(s + slen - sublen, sub, sublen) == 0;
345}
346
347/* Returns int value of hex string character |c| */
348static uint8_t hex_to_uint(uint8_t c) {

Callers 1

check_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected