msaleem-583379 has a pretty good function. I modified it to return varchar instead of int values. As such, it needed a couple of improvements:
1. Empty strings or spaces on either side of a comma returned a row, but emtpy string or spaces with no comma returned no rows, which is inconsistent. I made it return one row with an emtpy string when receiving an empty string for input. (NULL still returns 0 rows.)
2. If last item in input was spaces, it returned empty string; in other positions, the spaces were returned. I made it return all spaces in last item.
These changes required:
a. Removing "Or Len(@csv) = 0" from the first IF.
b. Getting the full length of the input with "@RealLength = len(@csv + 'x') - 1" and using @RealLength instead of len(@csv) in the final SELECT.