Refactoring `string.capitalize()` to accept a new `Boolean` parameter to capitalize all words within the `String`