iswpunct - Checks for any printable character that is not a space or an alphanumeric character.
iswpunct("…");
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 while ispunct operates on single byte characters. If your locale is defined as multibytes, then iswpunct is the best solution.
if iswpunct(a) then "ok"; else "nok"; endif
{{ include("includes/strings.sn") }}
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
1.0 2014-09-09 21:24:14 laplante@sednove.com
Edit© 2024 extenso Inc. All rights reserved.