Skip to content
Advertisement

Tag: carriage-return

How to get text before carriage return

I’m loading the following JSON into my program: I want to extract the substring “apple foo text” with: But it only returns hello world. I know it is because of the carriage return statement, but I’m not sure how to to print the substring before. How would I get just the text before the statement? Any help would be appreciated.

Advertisement