changeset 660:6510d76966f8

Delete th_strip_ctrlchars().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 27 Jan 2020 06:02:22 +0200
parents da9618444c81
children 7f1efa37288b
files th_string.c th_string.h
diffstat 2 files changed, 0 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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, ...)