MCPcopy Create free account
hub / github.com/dillo-browser/dillo / dStrstrip

Function dStrstrip

dlib/dlib.c:122–135  ·  view source on GitHub ↗

* Remove leading and trailing whitespace */

Source from the content-addressed store, hash-verified

120 * Remove leading and trailing whitespace
121 */
122char *dStrstrip(char *s)
123{
124 char *p;
125 int len;
126
127 if (s && *s) {
128 for (p = s; dIsspace(*p); ++p);
129 for (len = strlen(p); len && dIsspace(p[len-1]); --len);
130 if (p > s)
131 memmove(s, p, len);
132 s[len] = 0;
133 }
134 return s;
135}
136
137/**
138 * Clear the contents of the string

Callers 11

Cookies_load_cookiesFunction · 0.85
Cookie_control_initFunction · 0.85
dParser_parse_rc_lineFunction · 0.85
a_Dpi_srsFunction · 0.85
Cookies_rc_checkFunction · 0.85
parseValueMethod · 0.85
Cookie_control_initFunction · 0.85
applyMethod · 0.85
a_Domain_parseFunction · 0.85
Url_object_newFunction · 0.85
Hsts_preloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected