text in fields (CR/LF, CR, LF) which is correct?
dsc at swcp.com
Fri Aug 30 16:58:52 CDT 2002
On Friday, August 30, 2002, at 01:03 PM, Kee Nethery wrote:
> function adjustLineEndOS thetext
> replace (numtochar(13) & numtochar(10)) with numtochar(13) in thetext
> replace numtochar(10) with numtochar(13) in thetext
> replace numtochar(10) with getLineEnd() in thetext
> return thetext
> end adjustLineEndOS
I don't think this will work. I think one of us got you off into
the wrong direction.
The line end on Revolution is numToChar(10).
Maybe this will work...
function adjustLineEndInput thetext
replace (numtochar(13) & numtochar(10)) with numtochar(13) in thetext
replace numtochar(13) with numtochar(10) in thetext -- fixed typo
This is just yours above with a typo correction. It is even better
than what I have been using. I'm going to try it!
This even handles the hybrid cr lf lf correctly. Cool!
More information about the use-livecode