Potresti mettere in un buffer o far stampare (a seconda di quello che devi fare) la stringa...

copy nel buffer la stringa fino a che non trova \r\n