function

ispunct . string . sncode

VERSIONlatest Checks for any printable character which is not a space or an alphanumeric character.

ISPUNCT

NAME

ispunct - Checks for any printable character which is not a space or an alphanumeric character.

SYNOPSIS

ispunct("…");

DESCRIPTION

This function is used to determine whether a character is a punctuation one or not. The argument of the function can be a single character or a string. If it is a string, each character has to be a punctuation in order for the function to be true. The variable can be a chain of characters defined before the program.

The standard "C" locale considers punctuation characters as all graphic characters that are not alphanumeric.

Other locales may consider a different selection of characters as punctuation as long as they are part of isgraph, but they will never consider characters returning true for isalnum.

Iswpunct operates on wide characters where ispunct operates on single byte characters. If your locale is multibytem iswpunct is the best solution.

EXAMPLES

if ispunct(a) then 
        "ok"; 
else 
        "nok"; 
endif

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>