Property Character Types Class

CType

Return the current character classification (CType) string.

Signature (Visual Basic / VBA)

Public Property Get CType( _
    ) As Variant

Code Examples

    ? CType = CTypeANSI
    True
    CType = CTypeUSASCII
    CType = CTypeANSI
Public Property Let CType( _
    ByVal vDescriptor As Variant _
    )

Notes & Version History

Details "Initialize Character Types" Initialize the character classification handling functions.
vDescriptor String containing Character Type Codes which describe the classification for characters within a specific character set, such as the ANSI Windows or US ASCII character sets. vDescriptor defaults to the descriptor string for the ANSI Windows character set if it is not a String. The character at each position describes the classification for the character whose ASCII value is one less than the number of the position--classification for character with ASCII value X is at Mid$(vDescriptor, X + 1, 1). The Character Type Codes are detailed in the Declarations help topic.
Note The default character set is the Windows/ANSI character set, not the USASCII one as is standard with the C language C Type functions.
Note This function is called automatically with the definitions for the Windows ANSI character set each time an instance of this Class is created.
Note If the descriptor string does not contain a Character Type Code for each character whose ASCII value is between 0 (zero) and 255, then those characters with missing definitions are assigned to the "None" classification.
v1.2 Change When a classification character is unrecognized, the program now assumes ctCharTypeNone instead of stopping.