Basic usage of the string class
String is the alias of string, just as Int Is int32 and long is the alias of int64. These structures are derived from the valuetype class.
Attribute or Method |
Description |
Equals () |
Determine whether two string objects are equal |
Compareto () |
|
Startwith (s) |
Determines whether a string starts with S. |
Endwith (s) |
Determines whether a string ends with S. |
Gethashcode () |
Obtains the hash value of a string. |
Indexof (char) |
Index position of the first occurrence of a character (string) in a string |
Indexofany (char []) |
Index position where the character array appears for the first time in the string |
Lastindexof (char) |
The last index position of the character (string) in the string |
Lastindexofany (char []) |
The last index position of the character array in Str |
Substring () |
Substring |
Replace () |
Replace old characters with new characters |
Tolower () |
Converts a specified string to lowercase. |
Toupper () |
Converts a specified string to uppercase. |
Trim () |
Remove spaces on both sides of the string |
Trimend () |
Remove spaces on the right of the string |
Trimstart () |
Remove the space on the left of the string. |
Tostring () |
Convert to string |
Split () |
Splits a string based on a specific character. |
Join () |
Connect strings based on specific characters |
Basic usage of char
Char is of the struct type. Most methods of the char structure are static methods, and at least one character parameter is accepted.
Attribute or Method |
Description |
Isdigit () |
Determines whether the entered character is a number. |
Isletter () |
Determines whether the entered character is a letter. |
Islower () |
Determines whether the input character is a lowercase letter. |
Isupper () |
Determines whether the input character is an uppercase letter. |
Tolower () |
Converts the input characters to lowercase letters. |
Toupper () |
Converts the input characters into uppercase letters. |
Ispunctuation () |
Determines whether the entered character is a punctuation mark. |
Issymbol () |
Determines whether the entered character is a symbol. |
Iswhitespace () |
Determines whether the entered character is a blank character (replacement character, tab, space, etc) |