[Guava Study Notes] Strings: string processing, guavastrings

Source: Internet
Author: User

[Guava Study Notes] Strings: string processing, guavastrings

My technical blog is often maliciously crawled and reproduced by rogue websites. Please move to the original article: Workshop.

Joiner
Joiner joiner = Joiner.on("; ").skipNulls();return joiner.join("Harry", null, "Ron", "Hermione");

You can also. join (List)

Splitter
Splitter.on(',')       .trimResults()       .omitEmptyStrings()       .split("foo,bar,,   qux");

Can be on (CharMatcher), on (Pattern)FixedLength (int) is split into fixed lengths.

AvailableLimit (int) modifier to limit the number of returned results.

CharMatcher

Constant:ANYNONE WHITESPACEBREAKING_WHITESPACEDIGIT numbersJAVA_LETTER_OR_DIGITJAVA_LOWER_CASE lower case

Given: anyOf ("abcde ")Is (char)InRange ('A', 'z ')

Operation:Negate () inversionAnd (CharMatcher)AndOr (CharMatcher) Get or

CollapseFrom (CharSequence, char) is continuously replaced with a singleRemoveFrom (CharSequence)RetainFrom (CharSequence) only retains these items, and all others are removed.ReplaceFrom (CharSequence, CharSequence)

Charsets. UTF_8


How many days does it take for QQ to ascend from one sun to two?

The formula is: D = the square of R + 4 multiplied by R (D is the number of days, R is the level)

According to this formula, it is not difficult to calculate that it takes 832 days from one sun to two suns ~
So, please wait ~ No, just wait two more years.

By the way, the sun is 320 days, the sun is 1152 days, and the sun is 2496 days ~


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.