Methods for character variables
Methods for character variables are for manipulating and formatting individual characters.
Methods
Method | Description | Parameters | Result type |
Compare | Compares this instance to a specified Char object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified Char object. | Char object to compare | Int32 < zero: before value Zero: same position as value > zero: follows value |
Equals | Use Equal to compare two characters and determine if they are equivalent. Accepts two characters as an input with another input being CharComparrison. Returns a Boolean value to show whether the characters are equivalent. | Char - CharValue. The character to be compared. | Boolean: True if the value equals the variable value |
GetNumericValue | Converts the numeric Unicode character at the specified position in a specified string to a double-precision floating point number. | String Int32 | The numeric value of the character if a number; otherwise, -1. |
IsControl | Indicates whether the character is a control character. | String Int32 | Boolean: Returns True if a control character |
IsDigit | Indicates if a Unicode character is a decimal digit. | The Unicode character to evaluate. | Boolean: Returns True if a decimal digit |
IsLetter | Indicates whether a Unicode character is a Unicode letter. | Char: The Unicode character to evaluate. | Boolean: Returns True if a letter |
IsLetterOrDigit | Indicates whether a Unicode character is categorized as a letter or a decimal digit. | Char: The Unicode character to evaluate. | Boolean: Returns True if a letter or decimal digit |
IsLower | Indicates whether a Unicode character is categorized as a lowercase letter. | Char: The Unicode character to evaluate. | Boolean: Returns True if a lowercase letter |
IsNumber | Indicates whether a Unicode character is categorized as a number. | String Int32 | Boolean: Returns True if a number |
IsPunctuation | Indicates whether a Unicode character is categorized as a punctuation mark. | Char: The Unicode character to evaluate. | Boolean: Returns True if a punctuation mark |
IsSeparator | Indicates whether a Unicode character is categorized as a separator character. | Char: The Unicode character to evaluate. | Boolean: Returns True if a separator character |
IsSymbol | Indicates whether a Unicode character is categorized as a symbol character. | String Int32 | Boolean: Returns True if a symbol character |
IsUpper | Indicates whether a Unicode character is categorized as an uppercase letter. | Char | Boolean: Returns True if an uppercase letter |
IsWhitespace | Indicates whether a Unicode character is categorized as whitespace. | Char | Boolean: Returns True if whitespace |
ResetState | Resets all component properties to their initial values. | ||
SetFromHexEncoding | |||
ToLower | Converts the value of a Unicode character to its lowercase equivalent. | Char | Char: The lowercase equivalent of the value |
ToLowerInvariant | Converts the value of a Unicode character to its lowercase equivalent using the casing rules of the invariant culture. | Char | Char: The lowercase equivalent of the value |
ToString | Converts the value of this instance to its equivalent string representation. | provider: An object that supplies culture-specific formatting information. | Char: the string representation of the value |
ToUpper | Converts the value of a Unicode character to its uppercase equivalent. | Char | Char: the uppercase equivalent of the value |
ToUpperInvariant | Converts the value of a Unicode character to its uppercase equivalent using the casing rules of the invariant culture. | Char | Char: the uppercase equivalent of the value |
Previous topic Methods for DateTime variables Next topic Methods for color variables