this is the command responsible for adding a new line to the string
echo "string" | xclip -selection clipboard
echo -n "string" | xclip -selection clipboard
I should probably have elaborated a bit. The default for echo is to output the string AND a newline. -n suppreses the latter.