This documentation is copyright © 1998-2001 Sandro Sigala <sandro@sigala.it>.
All rights reserved.

Released under the GNU General Public License.

Return to index Return to header Previous symbol Next symbol

isgraph

Prototype

#include <ctype.h>

int isgraph(int c);

Description

Returns a true value if the c character is a printing character except the space character (' ').

Example

View source
#include <ctype.h>

/*
 * Remove the non-graphic characters from the argument string.
 */
char *filter_graphs(char *s)
{
    char *sp = s;

    while (*sp != '\0')
	if (!isgraph(*sp))
	    *sp = *(sp + 1);
	else
	    ++sp;

    return s;
}

References

ISO C 9899:1990 7.3.1.5