OT: Analyzing competitors - In this case Real Software
Troy Rollins
troy.rollins at gmail.com
Tue Mar 22 16:32:43 EST 2005
>
> i = instr(myString, chr$(13)+chr$(10))
> while (i >> 0)
> myString = left$(myString, i-1) + chr$(10) + mid$(myString, i+2)
> i = instr(myString, chr$(13)+chr$(10))
> wend
>
> Pretty close to what I came up with, although your implementation is
> more compact an probably a bit faster - I may go back and look into
> modifying mine a bit some day. I think you want right() instead of
> mid(), though, and the "$" syntax has been deprecated for some time
> now.
>
Just to be fair, and so not to get too overly smug, this is how
someone that is actually familiar with RB would approach the task -
EditField1.Text = ReplaceLineEndings(EditField1.Text,EndOfLine.Macintosh)
It hardly seems so crazy complex when put that way, does it?
FWIW.
--
Troy Rollins
RPSystems, Ltd.
www.rpsystems.net
More information about the use-livecode
mailing list