I've managed to figure out half the problem. Using my remove function and inputting the text from the second string (the one created when the text wraps) works fine, now it's just a matter of figuring out exactly what the characters in the top string are.