SDDSlib
Loading...
Searching...
No Matches
SDDS
mdblib
is_blank.c
Go to the documentation of this file.
1
/**
2
* @file is_blank.c
3
* @brief Implementation of is_blank function.
4
*
5
* @copyright
6
* - (c) 2002 The University of Chicago, as Operator of Argonne National Laboratory.
7
* - (c) 2002 The Regents of the University of California, as Operator of Los Alamos National Laboratory.
8
*
9
* @license
10
* This file is distributed under the terms of the Software License Agreement
11
* found in the file LICENSE included with this distribution.
12
*
13
* @author M. Borland, C. Saunders, R. Soliday
14
*/
15
16
#include "mdb.h"
17
#include <ctype.h>
18
19
/**
20
* @brief Determine whether a string is composed entirely of whitespace characters.
21
*
22
* This function checks each character in the input string to verify if it is a space character.
23
*
24
* @param s The null-terminated string to be checked.
25
* @return Returns 1 if the string is all whitespace, otherwise returns 0.
26
*/
27
long
is_blank
(
char
*s) {
28
register
char
*ptr;
29
30
ptr = s;
31
while
(*ptr && isspace(*ptr))
32
ptr++;
33
if
(*ptr)
34
return
(0);
35
return
(1);
36
}
is_blank
long is_blank(char *s)
Determine whether a string is composed entirely of whitespace characters.
Definition
is_blank.c:27
Generated by
1.12.0