summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-11-11 16:38:41 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2000-11-11 16:38:41 +0100
commit54a2e99c7b86cafa5ad350171f021589ef2a80df (patch)
treed51d12d8ba6365648aabee1c9e70c00bac3d8b46 /tools.c
parent9c499caf87d6d8f3758a8968d35c71d33927cc0e (diff)
downloadvdr-54a2e99c7b86cafa5ad350171f021589ef2a80df.tar.gz
vdr-54a2e99c7b86cafa5ad350171f021589ef2a80df.tar.bz2
Implemented 'Commands' menu
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index 4acea0b3..6d86f162 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.22 2000/10/29 11:21:55 kls Exp $
+ * $Id: tools.c 1.23 2000/11/11 15:17:12 kls Exp $
*/
#define _GNU_SOURCE
@@ -92,6 +92,18 @@ char *skipspace(const char *s)
return (char *)s;
}
+char *stripspace(char *s)
+{
+ if (s && *s) {
+ for (char *p = s + strlen(s) - 1; p >= s; p--) {
+ if (!isspace(*p))
+ break;
+ *p = 0;
+ }
+ }
+ return s;
+}
+
bool isempty(const char *s)
{
return !(s && *skipspace(s));