function

isalnum . string . sncode

VERSIONlatest 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

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>