ispunct

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

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

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

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.