diff options
Diffstat (limited to 'sdk/other/strblank.c')
-rw-r--r-- | sdk/other/strblank.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sdk/other/strblank.c b/sdk/other/strblank.c new file mode 100644 index 0000000..d3e8d18 --- /dev/null +++ b/sdk/other/strblank.c @@ -0,0 +1,24 @@ +/* + * Test for blank strings. + * $Id$ + * Copyright (c) 1997 by Tycho Softworks. + * For conditions of distribution and reuse see product license. + */ + +#include <other/string.h> + +char __SPACES[] = " \t\r\n"; + +bool strblank(const char *str) +{ + if(!str) + return TRUE; + + while(*str) + { + if(!strchr(__SPACES, *str)) + return FALSE; + ++str; + } + return TRUE; +} |