The replace function returns the new string with the replaces, but if there weren\'t any words to replace, then the original string is returned. Is there a way to k
replace
Comparing the before and after strings is the easiest way to check if it did anything, there's no intrinsic support in String.replace().
String.replace()
[contrived example of how '==' might fail deleted because it was wrong]