Here's my command for formatting a particular word.
\newcommand{\foo}{\textsf{FOO}}
Used like this
This is \foo and \foo.
it produces the following
In plain text, the output is FOOand FOO., with no space after either FOO.
I want my command to behave spatially as if I had typed FOO instead of \foo. That is, the space which follows \foo should not be collapsed, so there would be whitespace before the and but not before the full stop.
How can I do this?

xspacepackage – samcarter_is_at_topanswers.xyz Jan 06 '17 at 23:51xspace. – Werner Jan 06 '17 at 23:53