# HG changeset patch # User Matti Hamalainen # Date 1580097742 -7200 # Node ID 6510d76966f86aca8f616482e3389542eeeae9e8 # Parent da9618444c81ea90596c3f6d7dea7fbe476055e9 Delete th_strip_ctrlchars(). diff -r da9618444c81 -r 6510d76966f8 th_string.c --- a/th_string.c Mon Jan 27 06:01:57 2020 +0200 +++ b/th_string.c Mon Jan 27 06:02:22 2020 +0200 @@ -505,27 +505,6 @@ } -/* Remove all occurences of control characters, in-place. - * Resulting string is always shorter or same length than original. - */ -void th_strip_ctrlchars(char *str) -{ - char *i, *j; - assert(str != NULL); - - i = str; - j = str; - while (*i) - { - if (!th_iscntrl(*i)) - *(j++) = *i; - i++; - } - - *j = 0; -} - - /* Copy a given string over in *pdst. */ int th_pstr_cpy(char **pdst, const char *src) diff -r da9618444c81 -r 6510d76966f8 th_string.h --- a/th_string.h Mon Jan 27 06:01:57 2020 +0200 +++ b/th_string.h Mon Jan 27 06:02:22 2020 +0200 @@ -124,7 +124,6 @@ int th_strcasecmp(const char *haystack, const char *needle); int th_strncasecmp(const char *haystack, const char *needle, size_t n); char *th_strrcasecmp(char *haystack, const char *needle); -void th_strip_ctrlchars(char *str); int th_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap); int th_snprintf(char *buf, size_t size, const char *fmt, ...)