[Freeswitch-svn] [commit] r5265 - freeswitch/trunk/src/include
Freeswitch SVN
anthm at freeswitch.org
Tue Jun 5 12:21:30 EDT 2007
Author: anthm
Date: Tue Jun 5 12:21:30 2007
New Revision: 5265
Modified:
freeswitch/trunk/src/include/switch_utils.h
Log:
add util
Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h (original)
+++ freeswitch/trunk/src/include/switch_utils.h Tue Jun 5 12:21:30 2007
@@ -177,6 +177,15 @@
#define switch_set_string(_dst, _src) switch_copy_string(_dst, _src, sizeof(_dst))
+static __inline__ void switch_clean_string(char *s)
+{ char *p;
+
+ for (p = s; p && *p; p++) { uint8_t x = (uint8_t) *p; if (x < 32 || x > 127) { *p = ' '; }
+ }
+}
+
+
+
/*!
\brief Free a pointer and set it to NULL unless it already is NULL
\param it the pointer
More information about the Freeswitch-svn
mailing list