isalpha - Checks for an alphabetic character.
isalpha("…");
This function is used to determine if the argument is an alphabetic character. Alphabetic characters are latin letters. The argument of the function can be a single character or a string. In the latter case, each character has to be alphabetic 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.
Iswalpha operates on wide characters where isalpha operates on single byte characters. If your locale is multibyte, iswalpha would be the prefered solution.
if isalpha(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.