A complete list of javascript string manipulation functions

伊谢尔伦
Release: 2016-11-22 13:24:41
Original
1350 people have browsed it

concat() – Concatenates two or more characters of text and returns a new string.
indexOf() – Returns the index of the first occurrence of a substring in a string. If there is no match, -1 is returned.
charAt() – Returns the character at the specified position.
lastIndexOf() – Returns the index of the last occurrence of a substring in a string, or -1 if there is no match.
match() – Checks whether a string matches a regular expression.
substring() – Returns a substring of a string. The incoming parameters are the starting position and the ending position.
replace() – Used to find a string that matches a regular expression and then replace the matching string with a new string.
search() – Performs a regular expression match search. If the search is successful, the matching index value in the string is returned. Otherwise, -1 is returned.
slice() – Extracts a portion of a string and returns a new string.
split() – Make a string into an array of strings by dividing the string into substrings.
length – Returns the length of the string. The length of the string refers to the number of characters it contains.
toLowerCase() – Convert the entire string to lowercase letters.
toUpperCase() – Convert the entire string to uppercase letters.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!