diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-11-11 16:38:41 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-11-11 16:38:41 +0100 |
commit | 54a2e99c7b86cafa5ad350171f021589ef2a80df (patch) | |
tree | d51d12d8ba6365648aabee1c9e70c00bac3d8b46 /tools.c | |
parent | 9c499caf87d6d8f3758a8968d35c71d33927cc0e (diff) | |
download | vdr-54a2e99c7b86cafa5ad350171f021589ef2a80df.tar.gz vdr-54a2e99c7b86cafa5ad350171f021589ef2a80df.tar.bz2 |
Implemented 'Commands' menu
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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)); |