char-syntax

char-syntax is a built-in function in `C source code'.

(char-syntax CHARACTER)

Return the syntax code of CHARACTER, described by a character.
For example, if CHARACTER is a word constituent, the
character `w' (119) is returned.
The characters that correspond to various syntax codes
are listed in the documentation of `modify-syntax-entry'.