Modifying String Methods

Modifying string methods return new strings with the specified changes.

"cat".replace("c", "b") "bat"
"cat".toUpperCase() "CAT"
"CAT".toLowerCase() "cat"
" cat ".trim() "cat"