Character Type Handling

ObjectARX provides a package of character-handling functions, as shown in the table that follows. The advantage of this package over the standard C library package, ctype.h, is that these functions are independent of any specific character set and are not bound to ASCII. They are customized to the current AutoCAD language configuration. In other respects, they behave like their standard C counterparts.

Character type functions 

 

Function Name

Purpose

acutIsAlpha

Verifies that the character is alphabetic

acutIsUpper

Verifies that the character is uppercase

acutIsLower

Verifies that the character is lowercase

acutIsDigit

Verifies that the character is a digit

acutIsXDigit

Verifies that the character is a hexadecimal digit

acutIsSpace

Verifies that the character is a white-space character

acutIsPunct

Verifies that the character is a punctuation character

acutIsAlNum

Verifies that the character is alphanumeric

acutIsPrint

Verifies that the character is printable

acutIsGraph

Verifies that the character is graphical

acutIsCntrl

Verifies that the character is a control character

acutToUpper

Converts the character to uppercase

acutToLower

Converts the character to lowercase

The following code fragment takes a character (the value in this example is arbitrary) and converts it to uppercase. The acutToUpper() function has no effect if the character is already uppercase.

int cc = 0x24; 
cc = acutToUpper(cc);