Is it true that sometimes we may have
ASCII character 13 & ASCII character 10
or
ASCII character 10 & ASCII character 13 ?
In theory, yes, but in practice I find that those systems which use
both characters together to indicate a newline always put the \r
(ASCII character 13) first. (In the case of the TELNET protocol and
various derivatives - e.g.SNMP, HTTP, etc - the RFC's specifically
require \r\n rather than \n\r).
Which is pretty much the interpretation when using AppleScript's
"paragraph" text elements, too:
-------------------------
tell (ASCII character 10) to set l to {return, it, return & it, it &
return}
repeat with i in l
set text item delimiters to i's contents
set i's contents to paragraphs of ({"a", "b", "c"} as string)
end repeat
set text item delimiters to {""}