- Subject: Re: Re: Re: SLang tab completion - update 2002-08-05
- From: "John E. Davis" <davis>
- Date: Sun, 11 Aug 2002 17:58:24 -0400
ks <klaus.schmid@xxxxxx> wrote:
>define strreverse( s)
>{
> variable r= "";
>
> foreach ( s) r= char(()) +r;
>
> return r;
>}
One of the most powerful and overlooked features of slang is it's ease
of array manipulation. For example, the above function can be written
as in a much simpler fashion as:
define strreverse (s)
{
return s[[strlen(s)-1:0:-1]];
}
>define strreplace( s, a, b, n)
Looks good.
Thanks,
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2002 date index]
[2002 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]