@Jarod42 I didn't pass by reference because I needed a new string to return and this way its clearly a copy of the passed string.