Return the part of a string before a character sequence in PHP
I have a rawurlencoded string and want to get everything from the beginning of a string until a rawurlencoded newline (%0A) or carriage return (%0D) or the whole string if neither are in the string. Example From these strings: First%20sentence.%0D%0ASecond%20Sentence.…