ctype

This command is part of the TclX pacakge.

ctype ?-failindex var? class string

Returns whether the string is in the given class, optionally setting var to the index of the first character in string that is not in the class.

The following classes are supported:

alnum, alpha, ascii, cntrl, digit, graph, lower, space, print, punct, upper, xdigit

There are also char and ord special classes for conversion between characters and their unicode code points.


See also