I see that the string you copy to the clipboard ends with a new line. Of course this new line is pasted and thus your cursor is on the new line.
Somehow you have to get rid of this new line. The method to do this depends on your precise specifications:
If the string is copied to the clipboard, the complete string is copied to the clipboard
If this is your specification, then everyone who pastes your copied string will end with the new line at the end of your string. If the paster is a program that you can't control, you can't do anything about it.
Another specification could be:
If the string is copied to the clipboard, all but a possible terminating new line is copied to the clipboard
This way you'll get what you want, pasters won't see the terminating new line. But be aware that this way the string on the clipboard is not the original string.
Code (of course this can be optimized, just showing small steps)
StringBuilder sbItems = FillStringBuilder(...);
// before copying, remove a possible new line character
// for this we use property System.Environment.NewLine
var stringToCopyToClipboard = sbItems.ToString();
if (stringToCopyToClipboard.EndsWith(Environment.NewLine)
{
int newLineIndex = stringToCopyToClipboard.LastIndexOf(Environment.NewLine);
stringToCopyToClipboard = stringToCopyToClipboard.Substring(0, newLineIndex);
}
Clipboard.SetText(stringToCopyToClipboard);