IsCharAlphaNumeric

3.0

  BOOL IsCharAlphaNumeric(chTest)    
  char chTest; /* character to test, */  

The IsCharAlphaNumeric function determines whether a character is in the set of language-defined alphabetic or numeric characters.

Parameters

chTest

Specifies the character to be tested.

Return Value

The return value is nonzero if the character is in either the set of alphabetic characters or the set of numeric characters. Otherwise, it is zero.

Comments

The language driver for the current language (the language the user selected at setup or by using Control Panel) determines whether the character is in the set. If no language driver is selected, Windows uses an internal function.

Example

The following example uses the IsCharAlphaNumeric function to find the first nonalphanumeric character in a string:

for (lpszNon = lpsz; IsCharAlphaNumeric(*lpszNon);
        lpszNon = AnsiNext(lpszNon));

See Also

IsCharAlpha