Goto main content

iswcntrl

Checks for an control character.

ISWCNTRL

NAME

iswcntrl - Checks for a control character.

SYNOPSIS

iswcntrl("…");

DESCRIPTION

This function is used to determine whether the argument is a control character or not. Control characters are the one controlling the output. They do not occupy a printing position as display. An example of a control character would be /n, the character used 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.

EXAMPLES

if iswcntrl(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

© 2022 extenso Inc. All rights reserved.