C # string function (Part)

Source: Internet
Author: User

FangMethod

WorkUse

Compare

To compare the content of a string, consider Culture Background(Location)To determine whether some characters are equal

Compareordinal

AndCompareSame, but not considering the cultural background

Format

Format strings containing various values and how to format the specifiers for each value

Indexof

Locate the first occurrence of a given substring or character in a string

Indexofany

Locate the first occurrence of a character or a group of characters in a string

Lastindexof

AndIndexofSame, but locate the last occurrence

Lastindexofany

AndIndexofanyBut locate the last location

Padleft

At the beginning of the string, fill in the string by adding the specified repeated characters

Padright

At the end of the string, fill the string with the specified repeated characters

Replace

Replaces a given character or substring with another character or substring

Split

Splits a string into a substring array where a given character appears.

Substring

Obtain the substring at the specified position in the string.

Tolower

Converts a string to lowercase.

Toupper

Converts a string to uppercase.

Trim

Delete blank spaces at the beginning and end

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.