Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Methods for character variables

Updated on October 19, 2022

Methods for character variables are for manipulating and formatting individual characters.

Methods

MethodDescriptionParametersResult type
CompareCompares 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

EqualsUse 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
GetNumericValueConverts the numeric Unicode character at the specified position in a specified string to a double-precision floating point number.String Int32The numeric value of the character if a number; otherwise, -1.
IsControlIndicates whether the character is a control character.

String

Int32

Boolean: Returns True if a control character
IsDigitIndicates if a Unicode character is a decimal digit. The Unicode character to evaluate. Boolean: Returns True if a decimal digit
IsLetterIndicates whether a Unicode character is a Unicode letter. Char: The Unicode character to evaluate. Boolean: Returns True if a letter
IsLetterOrDigitIndicates 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
IsLowerIndicates whether a Unicode character is categorized as a lowercase letter. Char: The Unicode character to evaluate. Boolean: Returns True if a lowercase letter
IsNumberIndicates whether a Unicode character is categorized as a number.

String

Int32

Boolean: Returns True if a number
IsPunctuationIndicates whether a Unicode character is categorized as a punctuation mark. Char: The Unicode character to evaluate. Boolean: Returns True if a punctuation mark
IsSeparatorIndicates whether a Unicode character is categorized as a separator character. Char: The Unicode character to evaluate. Boolean: Returns True if a separator character
IsSymbolIndicates whether a Unicode character is categorized as a symbol character.

String

Int32

Boolean: Returns

True

if a symbol character
IsUpperIndicates whether a Unicode character is categorized as an uppercase letter. CharBoolean: Returns True if an uppercase letter
IsWhitespaceIndicates whether a Unicode character is categorized as whitespace. CharBoolean: Returns True if whitespace
ResetStateResets all component properties to their initial values.
SetFromHexEncoding
ToLowerConverts the value of a Unicode character to its lowercase equivalent. CharChar: The lowercase equivalent of the value
ToLowerInvariantConverts the value of a Unicode character to its lowercase equivalent using the casing rules of the invariant culture. CharChar: The lowercase equivalent of the value
ToStringConverts 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
ToUpperConverts the value of a Unicode character to its uppercase equivalent. CharChar: the uppercase equivalent of the value
ToUpperInvariantConverts the value of a Unicode character to its uppercase equivalent using the casing rules of the invariant culture. CharChar: the uppercase equivalent of the value

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us