<-- Previous || Up || Next -->

Declarations Section
Character Types Class

These functions classify characters according to various types such as alphanumeric, alphabetical, numeric, hexadecimal numeric, etc. Some of them perform simple conversions based upon character classification.
Copyright 1998 Entisoft

Note: This Class is automatically initialized with the definitions for the ANSI/Windows character set.

See also:

    StringWords Class
    CharacterArrays Class
    SortOrders Class
    StringExtras Class
ASCIIValueConstants Enum: Global Constants of US ASCII values for certain characters, etc.
See also:
    CharacterTypes Class
    GlobalConstants Class
AscAmpersand: US ASCII value of the ampersand ("&") character.
Example:
    Chr$(AscAmpersand) = "&"
AscApostrophe: US ASCII value of the apostrophe ("'") character.
Also known as the single-quote character.
Formerly available as AscSingleQuote.
Example:
    Chr$(AscApostrophe) = "'"
AscAsterisk: US ASCII value of the asterisk ("*") character.
Also known as the star or multiplication sign.
Example:
    Chr$(AscAsterisk) = "*"
AscAt: US ASCII value of the at-sign ("@") character.
Example:
    Chr$(AscAt) = "@"
AscBackquote: US ASCII value of the back-quote ("`") character.
The key to the left of "1" on US 101-key keyboards.
Example:
    Chr$(AscBackquote) = "`"
AscBackslash: US ASCII value of the back-slash ("\") character.
Example:
    Chr$(AscBackslash) = "\"
AscBackspace: US ASCII value of the backspace ({Ctrl}+H) character.
Causes printers and terminals to move the cursor back one space.
Example:
    Chr$(AscBackspace) = Chr$(8)
AscCaret: US ASCII value of the up-caret ("^") character.
Example:
    Chr$(AscCaret) = "^"
AscColon: US ASCII value of the colon (":") character.
Example:
    Chr$(AscColon) = ":"
AscComma: US ASCII value of the comma (",") character.
Example:
    Chr$(AscComma) = ","
AscCR: "ASCII Carriage Return"
US ASCII value of the carriage return ({Ctrl}+M) character.
Formerly available as AscCarriageReturn.
Example:
    Chr$(AscCR) = Chr$(13) = vbCr
See also:
    AscLF Property
    vbCr Property
AscDegrees: US ASCII value of the temperature degrees symbol.
The symbol resembles a superscript circle.
Example:
    Chr$(AscDegrees) = Chr$(176)
AscDollarSign: US ASCII value of the dollar sign ("$") character.
Example:
    Chr$(AscDollarSign) = "$"
AscDoubleQuote: US ASCII value of the double-quote ('"') character.
Example:
    Chr$(AscDoubleQuote) = """"
AscEOF: "ASCII End Of File"
Special definition which represents end-of-file conditions within stream input routines.
Is currently defined (like UNIX) at -1.
Example:
    AscEOF = -1
AscEquals: US ASCII value of the equal sign ("=") character.
Example:
    Chr$(AscEquals) = "="
AscEscape: US ASCII value of the Escape key.
Example:
    Chr$(AscEscape) = Chr$(27)
AscExclamation: US ASCII value of the exclamation point ("!") (exclamation sign) character.
Formerly available as AscBang.
Example:
    Chr$(AscExclamation) = "!"
AscGreaterThan: US ASCII value of the greater-than sign (">") character.
Example:
    Chr$(AscGreaterThan) = ">"
AscLeftBrace: US ASCII value of the left brace ("{") character.
Example:
    Chr$(AscLeftBrace) = "{"
AscLeftBracket: US ASCII value of the left bracket ("[") character.
Example:
    Chr$(AscLeftBracket) = "["
AscLeftParen: "ASCII Left Parenthesis"
US ASCII value of the left parenthesis ("(") character.
Example:
    Chr$(AscLeftParen) = "("
AscLowerCaseA: US ASCII value of the lower-case letter "a"
Example:
    Chr$(AscLowerCaseA) = "a"
AscLowerCaseF: US ASCII value of the lower-case letter "f"
Example:
    Chr$(AscLowerCaseF) = "f"
AscLowerCaseZ: US ASCII value of the lower-case letter "z"
Example:
    Chr$(AscLowerCaseZ) = "z"
AscLessThan: US ASCII value of the less-than sign ("<") character.
Example:
    Chr$(AscLessThan) = "<"
AscLF: "ASCII Line Feed"
US ASCII value of the line feed ({Ctrl}+J) character.
Also known as NL or New Line.
Formerly available as AscLineFeed.
Example:
    Chr$(AscLF) = Chr$(10) = vbLf
See also:
    AscCR Property
    vbLf Property
AscMinus: US ASCII value of the minus sign ("-") character.
Also known as dash or hyphen.
Example:
    Chr$(AscMinus) = "-"
AscNil: US ASCII value of the nil (Chr$(0)) character.
Is defined as zero (0).
Example:
    Chr$(AscNil) = Chr$(0)
See also:
    vbNullChar Property
AscNine: US ASCII value of the character representing the number nine ("9").
Example:
    Chr$(AscNine) = "9"
AscNumberSign: US ASCII value of the number sign ("#") character.
Also known as the pound sign.
Formerly available as AscPound.
Example:
    Chr$(AscNumberSign) = "#"
AscOne: US ASCII value of the character representing the number one ("1").
Example:
    Chr$(AscOne) = "1"
AscPercent: US ASCII value of the percent sign ("%") character.
Example:
    Chr$(AscPercent) = "%"
AscPeriod: US ASCII value of the period (".") character.
Also known as dot.
Formerly available as AscDot.
Example:
    Chr$(AscPeriod) = "."
AscPlus: US ASCII value of the plus sign ("+") character.
Example:
    Chr$(AscPlus) = "+"
AscQuestionMark: US ASCII value of the question mark ("?") character.
Example:
    Chr$(AscQuestionMark) = "?"
AscRightBrace: US ASCII value of the right brace ("}") character.
Example:
    Chr$(AscRightBrace) = "}"
AscRightBracket: US ASCII value of the right bracket ("]") character.
Example:
    Chr$(AscRightBracket) = "]"
AscRightParen: "ASCII Right Parenthesis"
US ASCII value of the right parenthesis (")") character.
Example:
    Chr$(AscRightParen) = ")"
AscSemicolon: US ASCII value of the right semi-colon (";") character.
Example:
    Chr$(AscSemicolon) = ";"
AscSlash: US ASCII value of the slash ("/") character.
Also known as the divide sign.
Example:
    Chr$(AscSlash) = "/"
AscSpace: US ASCII value of the space (" ") character.
Example:
    Chr$(AscSpace) = " "
AscTab: US ASCII value of the tab ({Ctrl}+I) character.
Usually advances a terminal or printer to the next preset tab stop.
Example:
    Chr$(AscTab) = Chr$(9)
See also:
    vbTab Property
AscTilde: US ASCII value of the tilde ("~") character.
Sometimes used to represent approximate values.
Example:
    Chr$(AscTilde) = "~"
AscUnderline: US ASCII value of the underline ("_") character.
Example:
    Chr$(AscUnderline) = "_"
AscUpperCaseA: US ASCII value of the upper-case letter "A"
Example:
    Chr$(AscUpperCaseA) = "A"
AscUpperCaseF: US ASCII value of the upper-case letter "F"
Example:
    Chr$(AscUpperCaseF) = "F"
AscUpperCaseZ: US ASCII value of the upper-case letter "Z"
Example:
    Chr$(AscUpperCaseZ) = "Z"
AscVerticalBar: US ASCII value of the vertical-bar ("|") character.
Example:
    Chr$(AscVerticalBar) = "|"
AscZero: US ASCII value of the character representing the number zero ("0").
Example:
    Chr$(AscZero) = "0"
CharacterTypeConstants Enum: Constants for the character classifications recognized by the functions like IsAlpha and IsDigit.

CharTypeAlNum: "Character Type Alphanumeric"
Property whose value represents alphanumeric (alphabetic and numeric) characters ("0"..."9", "A"..."Z", "a"..."z", accented alphabetic characters, etc.) in calls to functions like EveryCharacterOfType.
Example:

    EveryCharacterOfType(CharTypeAlNum) = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Note: Example would also include some accented characters not shown here.
See also:
    IsAlNum Function
    CharTypeAlpha Property
    CharTypeDigit Property
    EveryCharacterOfType Function
Definition: ctCharTypeDigit Or ctCharTypeAlpha

CharTypeAlpha: "Character Type Alphabetic"
Property whose value represents alphabetic characters ("A"..."Z", "a"..."z", accented alphabetic characters, etc.) in calls to functions like EveryCharacterOfType.

Example:

    EveryCharacterOfType(CharTypeAlpha) = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Note: Example would also include some accented characters not shown here.
See also:
    IsAlpha Function
    CharTypeAlNum Property
    EveryCharacterOfType Function
Definition: ctCharTypeLower Or ctCharTypeUpper

CharTypeCarriage: "Character Type Carriage Control"
Property whose value represents carriage control type characters (carriage return, line feed, form feed, etc.) in calls to functions like EveryCharacterOfType.
Example:

    EveryCharacterOfType(CharTypeCarriage) = Chr$(9) + Chr$(10) + Chr$(11) + Chr$(12) + Chr$(13)
Character Codes:
    VB Expr.     Keyboard    Meaning
    Chr$(9)      Ctrl-I      Tab
    Chr$(10)     Ctrl-J      Line Feed
    Chr$(11)     Ctrl-K      Horizontal Tab
    Chr$(12)     Ctrl-L      Form Feed
    Chr$(13)     Ctrl-M      Carriage Return
See also:
    IsCarriage Function
    CharTypeCntrl Property
    EveryCharacterOfType Function
CharTypeCntrl: "Character Type Control"
Property whose value represents all control characters (Control+A, Control+B, ..., Control+Z) in calls to functions like EveryCharacterOfType.
Example:
    EveryCharacterOfType(CharTypeCntrl) = Chr$(0) + Chr$(1) + ....
See also:
    IsCntrl Function
    CharTypeCarriage Property
    EveryCharacterOfType Function
Definition: ctCharTypeControl Or ctCharTypeCarriage

CharTypeControl: "Character Type Control Non-Carriage"
Property whose value represents control characters (Control+A, Control+B, ..., Control+Z) which are NOT also carriage control characters in calls to functions like EveryCharacterOfType.
Example:

    EveryCharacterOfType(CharTypeControl) = Chr$(0) + Chr$(1) + ....
See also:
    CharTypeCarriage Property
    CharTypeCntrl Property
    EveryCharacterOfType Function
CharTypeDigit: "Character Type Numeric Digit"
Property whose value represents numeric digit characters ("0", "1", "2", ... "9") in calls to functions like EveryCharacterOfType.
Example:
    EveryCharacterOfType(CharTypeDigit) = "0123456789"
See also:
    IsDigit Function
    CharTypeAlNum Property
    EveryCharacterOfType Function
CharTypeGraph: "Character Type Graphical"
Property whose value represents alphanumeric ("0".."9", "A".."Z", "a".."z") and punctuation characters (",", ";", "'", etc.) in calls to functions like EveryCharacterOfType.
Example:
    EveryCharacterOfType(CharTypeGraph) = "!""#$\%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
Note: Example would also include many characters not shown here.
See also:
    IsGraph Function
    CharTypeAlNum Property
    CharTypePunctuation Property
    EveryCharacterOfType Function
Definition: ctCharTypeAlNum Or ctCharTypePunctuation

CharTypeHexadecimal: "Character Type Hexadecimal Digit"
Property whose value represents hexadecimal digit characters ("0", "1", "2", ... "9", "A"..."F", "a"..."f") in calls to functions like EveryCharacterOfType.
Example:

    EveryCharacterOfType(CharTypeHexadecimal) = "0123456789ABCDEFabcdef"
See also:
    IsXDigit Function
    CharTypeDigit Property
    EveryCharacterOfType Function
CharTypeHexDigit:
Definition: ctCharTypeDigit Or ctCharTypeHexadecimal

CharTypeHexLower:
Definition: ctCharTypeLower Or ctCharTypeHexadecimal

CharTypeHexUpper:
Definition: ctCharTypeUpper Or ctCharTypeHexadecimal

CharTypeLower: "Character Type Lower Case Alphabetic"
Property whose value represents lower-case characters ("a"..."z", accented lower-case characters, etc.) in calls to functions like EveryCharacterOfType.
Example:

    EveryCharacterOfType(CharTypeLower) = "abcdefghijklmnopqrstuvwxyz"
Note: Example would also include some accented characters not shown here.
See also:
    IsLower Function
    CharTypeUpper Function
    CharTypeAlpha Function
    EveryCharacterOfType Function
CharTypeNone: "Character Type None"
Property whose value represents characters with no separately-specified type in calls to functions like EveryCharacterOfType.
Example:
    EveryCharacterOfType(CharTypeNone) = ""
See also:
    EveryCharacterOfType Function
CharTypePrint: "Character Type Printable"
Property whose value represents printable characters--that is "graph" characters (alphanumerics and punctuation) and whitespace characters (Chr$(32) and Chr$(160)) in calls to functions like EveryCharacterOfType.
Example:
    EveryCharacterOfType(CharTypePrint) = " !""#$\%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
Note: Example would also include many characters not shown here.
See also:
    IsPrint Function
    CharTypeGraph Function
    CharTypeWhitespace Function
    EveryCharacterOfType Function
Definition: ctCharTypeGraph Or ctCharTypeWhitespace

CharTypePunctuation: "Character Type Punctuation"
Property whose value represents punctuation/symbol characters (",", ".", ";", etc.) in calls to functions like EveryCharacterOfType.
Example:

    EveryCharacterOfType(CharTypePunctuation) = "!""#$\%&'()*+,-./:;<=>?@[\]^_`{|}~"
Note: Example would also include many other characters not shown here.
See also:
    IsPunct Function
    CharTypeGraph Function
    EveryCharacterOfType Function
CharTypeSpace: "Character Type Space"
Property whose value represents space type characters--that is carriage control characters (carriage return, line feed, etc.) and whitespace characters (Chr$(32) and Chr$(160)) in calls to functions like EveryCharacterOfType.
Example:
    EveryCharacterOfType(CharTypeSpace) = Chr$(9) + Chr$(10) + Chr$(11) + Chr$(12) + Chr$(13) + Chr$(32) + Chr$(160)
See also:
    IsSpace Function
    CharTypeWhitespace Function
    EveryCharacterOfType Function
Definition: ctCharTypeCarriage Or ctCharTypeWhitespace

CharTypeUpper: "Character Type Upper Case Alphabetic"
Property whose value represents upper-case characters ("a"..."z", etc.) in calls to functions like EveryCharacterOfType.
Example:

    EveryCharacterOfType(CharTypeUpper) = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Note: Example would also include some accented characters not shown here.
See also:
    IsUpper Function
    CharTypeLower Property
    CharTypeAlpha Function
    EveryCharacterOfType Function
CharTypeWhitespace: "Character Type White Space"
Property whose value represents whitespace characters (Chr$(32) and Chr$(160)) in calls to functions like EveryCharacterOfType.
Example:
    EveryCharacterOfType(CharTypeWhitespace) = Chr$(32) + Chr$(160)
See also:
    IsSpace Function
    CharTypeSpace Function
    EveryCharacterOfType Function
ctCTYPE_ANSI, ctCTYPE_USASCII: Constants which define the classification of characters within specific character sets.

Character Type Codes: (See the CType Property)

    "B" = Control character
    "C" = Carriage control character
    "D" = Numeric digit
    "L" = Lower-case character
    "M" = Lower-case and hexadecimal numeric character
    "N" = No classification
    "P" = Punctuation character
    "S" = Whitespace character
    "U" = Upper-case character
    "W" = Upper-case and hexadecimal numeric character
    "X" = Hexadecimal digit
CharacterTable: These functions return strings containing formatted character tables. They can be printed in the Debug window, and they may be useful for testing other string functions.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.