Goto main content

isalnum

This function is used to verify that the argument string contain only alphabetic and digit character.

ISALNUM

NAME

isalnum - This function is used to verify that the argument string contain only alphabetic and digit character.

SYNOPSIS

isalnum("…");

DESCRIPTION

This function is used to determine if the argument contains only alphanumeric characters. Alphanumeric is a combination of alphabetic (latin letters) and numeric (arabic digits) characters. The argument of the function can be a single character or a string. in the latter case, each character has to be alphanumeric for the function to be true.

In the standart "C" locale, it is equivalent to (isupper(c) || islower(c)). In other locales, there may be additionnal characters that would be considered alphabetic. Those would be letters that are neither uppercase nor lowercase characters.

Iswalnum operates on wide characters where isalnum operates on single byte characters. If your locale is multibyte, iswalnum would be the prefered solution.

EXAMPLES

if isalnum(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.