diff common/strhelp.h @ 133:c719d3fdbc15

Added functrion to trim white space from string.
author Sascha Wilde <wilde@intevation.de>
date Mon, 24 Mar 2014 15:11:47 +0100
parents 9104b1b2e4da
children bf4bfd8843bd
line wrap: on
line diff
--- a/common/strhelp.h	Mon Mar 24 13:35:20 2014 +0100
+++ b/common/strhelp.h	Mon Mar 24 15:11:47 2014 +0100
@@ -66,4 +66,13 @@
  */
 bool str_starts_with (char *s1, char *s2);
 
+/**
+ * @brief Trims all white space from the start and end of string.
+ * @details the start of the string is trimmed by setting *s to the
+ * first non white space character.  The end is trimmed by setting the
+ * first character after the last non white space character to \0.
+ * @param[inout] s ponter to the string to strip
+ */
+bool str_trim (char **s);
+
 #endif

http://wald.intevation.org/projects/trustbridge/