One-click digging is not often used, but it is very practical to overload-Split, very practical-split

Source: Internet
Author: User

One-click digging is not often used, but it is very practical to overload-Split, very practical-split

Split is basically used by all program developers. Generally, a single character or long string is used to Split many strings. In fact, there is also a very useful overload, that is, multiple combinations of characters for splitting.
For example, "aaaaaaaaaa {@} bbbbbbbbbbbb {@} ccccccc # cccccc ";
Use the {@} character combination to split the array with a score of aaaaaaaaaa, bbbbbbbbbbbb, and ccccccc # cccccccc;

String SQL = "aaaaaaaaaa {} bbbbbbbbbbbb {} ccccccccc # cccccc "; // 1. Split a single combination of {@} string [] separator = new string [] {"{@}"}; // 2. Multiple combinations: {@}, # split string [] separator1 = new string [] {"{@}", "#"}; string [] arry = SQL. split (separator, StringSplitOptions. removeEmptyEntries );

Well, the Split character splitting is basically like this. There is no technical content. The key point is to dig it and it may be useful to you ~

I hope the above information will be helpful to beginners. Thank you!
More follow Fu Yi Fang technology blog: http://blog.csdn.net/fuyifang
Or scan the QR code on your mobile phone to view more blog posts:

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.