MCPcopy Create free account
hub / github.com/ddnet/ddnet / str_sanitize

Function str_sanitize

src/base/str.cpp:171–180  ·  view source on GitHub ↗

makes sure that the string only contains the characters between 32 and 255 + \r\n\t */

Source from the content-addressed store, hash-verified

169
170/* makes sure that the string only contains the characters between 32 and 255 + \r\n\t */
171void str_sanitize(char *str_in)
172{
173 unsigned char *str = (unsigned char *)str_in;
174 while(*str)
175 {
176 if(*str < 32 && !(*str == '\r') && !(*str == '\n') && !(*str == '\t'))
177 *str = ' ';
178 str++;
179 }
180}
181
182void str_sanitize_filename(char *str_in)
183{

Callers 1

GetStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected