String methods Flashcards
charAt()
Returns the character at the specified index (position).
charCodeAt()
Returns the Unicode of the character at the specified index.
codePointAt()
Returns a non-negative integer that is the Unicode code point value at the given position.
concat()
Joins two or more strings, and returns a new joined strings.
endsWith()
Checks whether a string ends with specified string/characters.
includes()
Checks whether a string contains the specified string/characters.
indexOf()
Returns the position of the first found occurrence of a specified value in a string.
lastIndexOf()
Returns the position of the last found occurrence of a specified value in a string.
localeCompare()
Compares two strings in the current locale.
match()
Searches a string for a match against a regular expression, and returns the matches.
matchAll()
Returns an iterator of all results matching a string against a regular expression.
normalize()
Returns the Unicode Normalization Form of a given string.
padEnd()
Pads the current string with another string (repeated, if needed) until it reaches a given length, starting at the end of the current string.
padStart()
Pads the current string with another string (repeated, if needed) until it reaches a given length, starting at the beginning of the current string.
repeat()
Returns a new string with a specified number of copies of an existing string.