function ExtractLine( cText, nFrom )
I found out that if I use instead of
nAt := At( CRLF, SubStr( cText, nFrom ) )
nAt := At( CRLF, cText, nFrom )
the speed of the function is much better. Is it save to remove SubStr here?
Thanks in advance
Otto
function ExtractLine( cText, nFrom )
local cLine, nAt
nAt := At( CRLF, SubStr( cText, nFrom ) )
if nAt > 0
cLine := Substr( cText, nFrom, nAt - 1 )
nFrom += nAt + 1
else
cLine := Substr( cText, nFrom )
nFrom := Len( cText ) + 1
endif
return cLine
//----------------------------------------------------------------------------//