Summary of of on the Use of Character Class char in C Language
- 2021-12-12 05:19:07
- OfStack
The char class represents one unicode character in C #, and it is these unicode characters that make up a string. unicode character is a general character code in computer at present. It sets a unified binary code for each character in different languages, which is used to meet the requirements of text conversion and processing across languages and platforms. The definition of char is very simple, as follows:
char ch1= 'z';
However, char can only define one unicode character.
The following are common usage methods and instructions of char class
iscontrol indicates whether the specified unicode character belongs to the control character category
isdigit indicates whether an unicode character belongs to the decimal digit category
ishighsurrogate indicates whether the specified char object is a high surrogate
isletter indicates whether an unicode character belongs to the letter category
isletterordigit indicates whether an unicode character belongs to the alphabetic or decimal digit category
islower indicates whether an unicode character belongs to the lowercase letter category
islowsurrogate indicates whether the specified char object is a low surrogate
isnumber indicates whether an unicode character belongs to the numeric category
ispunctuation indicates whether an unicode character belongs to the punctuation category
isseparator indicates whether an unicode character belongs to the delimiter category
issurrogate indicates whether an unicode character is a proxy character
issurrogatepair indicates whether two specified char objects form
issymbol indicates whether an unicode character belongs to the symbol category
isupper indicates whether an unicode character belongs to the capital letter category
iswhitespace indicates whether an unicode character belongs to the white space category
parse converts the value of a specified string to its unicode equivalent
tolower converts the value of an unicode string to its lowercase equivalent
tolowerinvariant converts the value of an unicode character to its lowercase equivalent using the case rules of a fixed culture
tostring converts the value of this instance to its equivalent string representation
toupper converts the value of an unicode character to its uppercase equivalent
toupperinvariant converts the value of an unicode character to its uppercase equivalent using the case rules of a fixed culture
tryparse converts the value of the specified string to its unicode equivalent
The following are common escape characters in C #
\ n Enter and Newline
\ f Page Change
\ t Skip sideways to the next 1 tabulation position
\\ Backslash
\ v Vertical Tab
\ 'Single quotation mark
\ b Backspace
\ ddd characters represented by 1 ~ 3 bits octal
\ r Enter
\ xhh characters represented by 1 ~ 2 digits 106-ary numbers