aboutsummaryrefslogtreecommitdiffstats
path: root/sdk/other/strblank.c
blob: d3e8d1894c356236cc8600570de9b6527ddc1196 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
}