There's nothing within this function that requires a copy of the string to be made, so we can make use of a non-owning view