The case of the word you’re calling after isn’t automatically capitalized - if the first letter of before is upper case, then the first letter of after should be to…
The case of the replacement should be the same as the replaced word.
Right so just have to change it to before, but I still have to account for if after first letter is uppercase and before first letter is not. Can I still do that with ternary operator or do I have to start from scratch?