Remove hard return from string?

Hello,

I have a multiline textfield were users can type text. I split the text in words so I can compair them to see if they are a certain word. Some words don’t pass the if statment even if they are the same (at leased to me). I found out it’s because these words have a hard return in front of them. I need to remove the hard return, but I can’t find out how. I tried to split the string on "
", but that doesn’t work. I’m used to Java so maybe I look at this problem the wrong way. I hope someone can help me with this.

Thanks,
:book: Ananta