Array and String methods for instance Parsing

Source: Internet
Author: User
Tags string methods
This article mainly summarizes the Array and String methods. Each section summarizes the instance code. The yellow box method in the Code does not change the original Array. PS: All instance results are obtained one by one. It has good reference value. If you need a friend, let's take a look at each part of the summary and there is an instance code. The yellow box method in the Code does not change the original array. PS: All instance results are obtained one by one.

Array

-- Common method

STACK: pop () push (multiple items)

Queue: shift () unshift (multiple items)

Sort: sort ([function]) reverse ()

Conversion: toString () toLocateString () join ([separator])

Operation: concat ([multiple items]) slice (start point [, end point]) splice (start point, number of items [, multiple items])

Location: indexOf (item [, start point]) lastIndexOf (item [, start point])

For more articles on the Array and String method for instance parsing, please follow the PHP Chinese network!

Related Article

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.