Getting rid of leading and trailing white space in a string is called "trimming." Trimming strings is often helpful when you work with input from a user of your program.
Called on: the string to be trimmed
Returns: the string without beginning or trailing white space
String trueSentence = " I have extra spaces! "; falseSentence = trueSentence.trim(); // "I have extra spaces!";