aboutsummaryrefslogtreecommitdiffstats
path: root/util/stringhelp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-12-31 11:44:29 +0000
committerWerner Koch <[email protected]>1999-12-31 11:44:29 +0000
commited0b0e09d3eb529dc83fab4f24d4fc3abe649bd2 (patch)
treeacdf31e4ef6ec6940169de6bd2a557451b8b73f9 /util/stringhelp.c
parentSee ChangeLog: Thu Dec 9 17:22:27 CET 1999 Werner Koch (diff)
downloadgnupg-ed0b0e09d3eb529dc83fab4f24d4fc3abe649bd2.tar.gz
gnupg-ed0b0e09d3eb529dc83fab4f24d4fc3abe649bd2.zip
See ChangeLog: Fri Dec 31 12:48:31 CET 1999 Werner Koch
Diffstat (limited to 'util/stringhelp.c')
-rw-r--r--util/stringhelp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/util/stringhelp.c b/util/stringhelp.c
index 16908f9a3..32318dad3 100644
--- a/util/stringhelp.c
+++ b/util/stringhelp.c
@@ -103,6 +103,28 @@ trim_spaces( char *str )
return str ;
}
+/****************
+ * remove trailing white spaces
+ */
+char *
+trim_trailing_spaces( char *string )
+{
+ char *p, *mark;
+
+ for( mark = NULL, p = string; *p; p++ ) {
+ if( isspace( *(byte*)p ) ) {
+ if( !mark )
+ mark = p;
+ }
+ else
+ mark = NULL;
+ }
+ if( mark )
+ *mark = '\0' ;
+
+ return string ;
+}
+
unsigned