Scott M. Mcdermott

UNIX Systems & Network Administrator
available for contract or salaried positions

string.c

/*
 * (c) 2002, 2003 Scott Mcdermott, GPL == 2.0
 */

#define _GNU_SOURCE

^L

#include <ctype.h>
#include <stdbool.h>
#include <assert.h>

^L

bool
contains_only_whitespace(char *p)
{
        int c;

        assert(p);

        while ((c = *p++))
                if (!isspace(c))
                        return false;

        return true;
}