iscntrl - Checks for a control character.
iscntrl("…");
This function is used to determine whether the argument is a control character. Control characters are the one controling the output. They do not occupy a printing position a display. An example of a control character would be /n, the character to change the line where the printable characters will be displayed.
In the standart ASCII character set used by the "C" locale, control characters are those located between ASCII codes 0x00(NUL) and 0x1f(US), plus 0x7f (DEL).
The argument of the function can be a single character or a string. In the latter case, each character has to be a control one for the function to be true.
Iswcntrl operates on wide characters while iscntrl operates on single byte characters. If your locale is multibyte, iswcntrl would be the prefered solution.
if iscntrl(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.