String methods Flashcards

1
Q

charAt()

A

Returns the character at the specified index (position).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

charCodeAt()

A

Returns the Unicode of the character at the specified index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

codePointAt()

A

Returns a non-negative integer that is the Unicode code point value at the given position.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

concat()

A

Joins two or more strings, and returns a new joined strings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

endsWith()

A

Checks whether a string ends with specified string/characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

includes()

A

Checks whether a string contains the specified string/characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

indexOf()

A

Returns the position of the first found occurrence of a specified value in a string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

lastIndexOf()

A

Returns the position of the last found occurrence of a specified value in a string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

localeCompare()

A

Compares two strings in the current locale.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

match()

A

Searches a string for a match against a regular expression, and returns the matches.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

matchAll()

A

Returns an iterator of all results matching a string against a regular expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

normalize()

A

Returns the Unicode Normalization Form of a given string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

padEnd()

A

Pads the current string with another string (repeated, if needed) until it reaches a given length, starting at the end of the current string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

padStart()

A

Pads the current string with another string (repeated, if needed) until it reaches a given length, starting at the beginning of the current string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

repeat()

A

Returns a new string with a specified number of copies of an existing string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

replace()

A

Searches a string for a value or a regular expression, and returns a new string where the specified values are replaced.

17
Q

replaceAll()

A

Returns a new string with all matches of a pattern replaced by a replacement.

18
Q

search()

A

Searches a string for a specified value, or regular expression, and returns the position of the match.

19
Q

slice()

A

Extracts a part of a string and returns the extracted part in a new string.

20
Q

split()

A

Splits a string into an array of substrings.

21
Q

startsWith()

A

Checks whether a string begins with specified characters.

22
Q

substring()

A

Extracts the characters from a string, between two specified indices.

23
Q

toLowerCase()

A

Converts a string to lowercase letters.

24
Q

toUpperCase()

A

Converts a string to uppercase letters.

25
Q

trim()

A

Removes whitespace from both ends of a string.

26
Q

trimEnd()

A

Removes whitespace from the end of a string.

27
Q

trimStart()

A

Removes whitespace from the beginning of a string.

28
Q

valueOf()

A

Returns the primitive value of a string object.