String Methods Flashcards

(21 cards)

1
Q

charAt()

A

Returns the character at the specified index.

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

charCodeAt()

A

Returns a number indicating the Unicode value of the character at the given index.

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

concat()

A

Combines the text of two strings and returns a new string.

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

indexOf()

A

Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.

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

lastIndexOf()

A

Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found.

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

localeCompare()

A

Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.

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

length()

A

Returns the length of the string.

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

match()

A

Used to match a regular expression against a string.

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

replace()

A

Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.

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

search()

A

Executes the search for a match between a regular expression and a specified string.

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

slice()

A

Extracts a section of a string and returns a new string.

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

split()

A

Splits a String object into an array of strings by separating the string into substrings.

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

split()

A

Splits a String object into an array of strings by separating the string into substrings.

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

substr()

A

Returns the characters in a string beginning at the specified location through the specified number of characters.

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

substring()

A

Returns the characters in a string between two indexes into the string.

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

toLocaleLowerCase()

A

The characters within a string are converted to lower case while respecting the current locale.

16
Q

toLocaleUpperCase()

A

The characters within a string are converted to upper case while respecting the current locale.

17
Q

toLowerCase()

A

Returns the calling string value converted to lower case.

18
Q

toString()

A

Returns a string representing the specified object.

19
Q

toUpperCase()

A

Returns the calling string value converted to uppercase.

20
Q

valueOf()

A

Returns the primitive value of the specified object.