you are not doing anything wrong, but splitting text based on newlines can be tricky...
especially, since the string_splits works on single characters only!
When you have a newline is can be (and most often is) 2 characters...namely \n and \r
Thus, when call the string_split, it will split "foo\n\rbar" in 3 records, "foo", "", "bar"
especially, since the string_splits works on single characters only!
When you have a newline is can be (and most often is) 2 characters...namely \n and \r
Thus, when call the string_split, it will split "foo\n\rbar" in 3 records, "foo", "", "bar"