String Objects Method's Flashcards
length()
numbers of characters in the string
a new string with all uppercase letters.
toLowerCase
a new string with all lowercase letters.
toUpperCase
Whether or not the string starts with some text.
startsWith(test)
characters from start index to just before stop index.
substring(start, stop)
whether or not the string ends with some text
endsWith
character at a specific index whether or not the string ends with some text.
charAt
s.charAt(1) returns ‘e’
charAt()
s.UpperCase() return’s “HELLO”
toUpperCase()
s.toLowerCase() returns “hello”
toLowerCase()
s.substring(1, 3) returns “el”
substring()
s.length() returns 5;
length()
s.endsWith(“llo”) returns true;
endsWith()
indexOf(“o”) returns 4;
indexOf
s.startsWith(“hi”)
returns false