MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Parsing



> txtb="";
> txt=args[1];
> txt=txt[2..length(txt)];
> n=index(txt,"/");
> txtb=txtb+txt[1..n-1];
> txt=txt[n+1..length(txt)];
> n=index(txt,"/");
> txtb=txtb+txt[1..n-1];
> txt=txt[n+1..length(txt)];
> txtb=txtb+txt;
> return txtb;
> 

Oh, my!  How about:

;$string_utils:explode("/foo/bar/etc","/")
=> {"foo", "bar", "etc"}
[used 71 ticks, 0 seconds.]

> 
> > Is it possible to have some verb on the MOO, when fed the args "/foo/bar/etc", 
> > to return "{"foo", "bar", "etc"}"?
> > 
> > Thanks...
> > 


References:

Home | Subject Index | Thread Index