if the string contains just \n, the STRLEN($string), of that string should be 2. if it's greater than two, it contains other character, or.
or you could find the last position of \n, get all the text before and after it, and make sure each one has a value besides ""
etc.