String methods

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

14 Terms

1
New cards

charAt (int index)

returns character at specified index

2
New cards

length()

counts number of characters in a string

3
New cards

subsrtring(from, to)

prints characters from index from up until not including to

4
New cards

substring(from)

prints characters including from till the end

5
New cards

indexOf(str)

finds index of first occurance and returns -1 if not found

6
New cards

this.compareTo(other)

compares two strings alphabetically, returns 0 if equal, negative if this comes before other, and positive if other comes before this

7
New cards

this.equals(other)

checks if this and other match

8
New cards

string(str)

creates new string

9
New cards

compareToIgnoresCase(str)

compares ignoreing capitiilzation

10
New cards

concat(str)

adds another string and returns the result

11
New cards

this.equalsIgnorecase(str)

checks if they are equal ignoring capitilzation

12
New cards

indexOf(str, fromIndex)

finds first occurance of string in starting inspecified index

13
New cards

toLowercase()

converts all letters to lowercase

14
New cards

toUpperCase

converts all letters to uppercase