Important methods and fields of the String class

Source: Internet
Author: User
  1. Length (): Gets the string length the space is also the length of his

Get the implementation of the length of a string:zichuan.length ()

  1. CharAt (): Gets the character at the specified position

Implementation method:Zichuan.charat ()

  1. GetChars (): Gets the substring from the specified position copied into the character array (it has four parameters, as described in the example)

Implementation method:Zichuan.getchars ( a number, a number , a character, a number )

  1. Replace (): substring substitution
  2. toUpperCase (), toLowerCase (): Uppercase and lowercase conversions
  3. Trim (): Remove the Kinsoku space:
  4. ToCharArray (): Converts a String object to a character array

Important methods and fields of the String class

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.