I\'d like to retrieve whatever is in quotes that someone enters as a string, i\'m assuming it\'s substring that I need but i\'m not sure how.
When the user inputs a stri
public String getNextQuote(int index, String sentence){
return sentence.substring(sentence.indexOf("\"", index + 1), sentence.indexOf("\"", index + 2));
}
usage: call the method with an index as parameter. This index resembles the index of the last "
that you've encountered.
Afterwards, it will return everything between the next two quotes.