Character

Summary

The wrapper class for the char primitive type.

Description

The System.Character class represents a single 16-bit Unicode character ranging from U+0000 to U+FFFF. The System.Character class is the wrapper class for the char primitive type.

All character literals are implemented as instances of the System.Character class.

Examples

Instantiation
1
2
3
import System;
 
System.Character a = new System.Character(`a`);
Auto-boxing
1
2
3
import System;
 
System.Character a = `a`;
Primitives Only
1
char a = `a`;

Methods

  • Character (Constructor)

    Constructs a System.Character object.

  • compare

    Compares the Character object to another Character object.

  • isAlpha

    Checks if the character is an alphabetic character.

  • isAlphaNumeric

    Checks if the character is an alphanumeric character.

  • isLowerCase

    Checks if the character represents a lowercase character.

  • isNumeric

    Checks if the character is a numeric digit.

  • isUpperCase

    Checks if the character represents an uppercase character.

  • isURICharacter

    Checks if the character is a valid URI character.

  • isWhitespace

    Checks if the character is a whitespace character.

  • repeat

    Repeats the character a specified number of times.

  • toBase

    Returns a string representation of the character value using the specified base.

  • toBinary

    Returns the binary (base 2) value of the character.

  • toDecimal

    Returns the decimal (base 10) value of the character.

  • toHex

    Returns the hexadecimal (base 16) value of the character.

  • toLowerCase

    Converts the character to lowercase.

  • toString

    Returns a string representation of the character.

  • toUInteger16

    Returns the 16-bit unsigned integer value for the character.

  • toUnicode

    Returns the 16-bit Unicode value as a string.

  • toUpperCase

    Converts the character to uppercase.

  • valueOf

    Returns the primitive character value wrapped by the System.Character object.

Share

HTML | BBCode | Direct Link