Two elements: string and escape characters

Source: Internet
Author: User

Strings String.

1. Immutability: Once the assignment is changed, each time the string changes, the pointer points to the new string.

2. Can be used: a new string can be produced between strings using the concatenation operator (+).

3. Common Properties: Length indicates string lengths, and the int type is obtained.

4. Common methods:

Trim (): de-lettering;

ToUpper (): converted to uppercase;

ToLower (): converted to lowercase form;

Split (): Split

Replace (): replacement

Remove (): Remove

LastIndexOf (): Last occurrence position

IsNullOrEmpty: Is null or a null character

IndexOf: The first occurrence of the position

Format: Replace

equals: Is it equal

5. Escape character:

Escape character meaning
\ ' Single-quote character
\ "single-quote character
\ \ backslash character "\"
A/s null character (NULL)
\a Ringing Bell
\b Backspace
\f Paper Change page
\ nthe line break
\ r Enter
\ t jumps horizontally to the next tab position
\v Vertical tabs (vertical tab)

In C #, "c:\\temp" means that the path is C:\Temp
and @ "C:\Temp" means C:\Temp
So, the action of @ should be to ignore the escape character.

Two elements: string and escape characters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.