RE: New rtrim()

new topic     » topic index » view thread      » older message » newer message

Igor,

Thanks for the suggestion.  I tried it in putsxy.e and didn't see any 
improvement in performance, so for the moment I'll stick with Jiri's 
original version.

Colin Taylor


Igor Kachan wrote:
> Dear Eu users,
> 
> There is the rtrim() function in
> the putsxy.e lib.
> 
> This function removes zeros from
> the end of a sequence.
> 
> New rtrim_() function makes the
> same thing about 30% faster 
> and is more simple.
> 
> --
> function rtrim_(sequence s)
>            for i=length(s) to 1 by -1 do
>           if s[i] then 
>    return s[1..i] end if end for
>    return {} 
> end function
> --
> 
> Use it please if you need such a function.
> 
> Regards,
> Igor Kachan
> kinz at peterlink.ru
> 
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu