How can I keep leading and trailing spaces in a parsed string?

Thanks for this! Will give it a test.

And in case you're wondering @LyricsLover, the previous solution has been working fine, but this new trim feature will be a much less hacky approach.