isprint - Checks for any printable character including space.
isprint("…");
This function is used to determine if the argument is a printable character. The argument can be a single character or a string. In the latter case, each character has to a printable one for the function to be true.
A printable character occupies a printing position in the display: it will appear in the output. This is the opposite of a control character.
For the standard ASCII character set used by the "C" locale, printable characters are all those with an ASCII code greater than 0x1f (US) except for 0x7f (DEL).
Isgraph returns true for the same characters as isprint, except for the space character. It returns true for isprint and false for isgraph.
Iswprint operates on wide characters while isprint operates on single byte characters. If your locale is multibyte, iswprint would be the prefered solution.
if isprint(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.