Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
40 lines (37 loc) · 3.73 KB

File metadata and controls

40 lines (37 loc) · 3.73 KB

String Methods Reference

This document provides a detailed overview of all JavaScript string methods covered in this repository.

Table of Methods

Method Description Link
at() Returns the character at a given index (supports negative indexing) Go to Folder
charAt() Returns the character at a specific index Go to Folder
charCodeAt() Returns the UTF-16 code unit at a specific index Go to Folder
codePointAt() Returns the Unicode code point at a specific index Go to Folder
concat() Concatenates one or more strings Go to Folder
endsWith() Checks if a string ends with another string Go to Folder
includes() Checks if a string contains another string Go to Folder
indexOf() Returns the first index of a substring Go to Folder
lastIndexOf() Returns the last index of a substring Go to Folder
localeCompare() Compares two strings based on the current locale Go to Folder
match() Matches a string against a regular expression Go to Folder
matchAll() Returns an iterator of all regex matches Go to Folder
normalize() Returns the Unicode Normalization Form of a string Go to Folder
padEnd() Pads the end of a string with another string Go to Folder
padStart() Pads the start of a string with another string Go to Folder
repeat() Repeats a string a specified number of times Go to Folder
replace() Replaces a pattern with a replacement string Go to Folder
replaceAll() Replaces all occurrences of a pattern Go to Folder
search() Searches for a match using a regular expression Go to Folder
slice() Extracts a section of a string Go to Folder
split() Splits a string into an array based on a separator Go to Folder
startsWith() Checks if a string starts with another string Go to Folder
substring() Returns a part of the string between two indices Go to Folder
toLocaleLowerCase() Converts string to lowercase based on locale Go to Folder
toLocaleUpperCase() Converts string to uppercase based on locale Go to Folder
toLowerCase() Converts string to lowercase Go to Folder
toString() Returns a string representation of the object Go to Folder
toUpperCase() Converts string to uppercase Go to Folder
trim() Removes whitespace from both ends Go to Folder
trimEnd() Removes whitespace from the end Go to Folder
trimStart() Removes whitespace from the start Go to Folder
valueOf() Returns the primitive value of a String object Go to Folder