MOO-cows Mailing List Archive

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

Re: Interesting code...



On Sun, 14 Jan 1996, Chuck Adams wrote:


> >    "%{a,b%{c,d}e,f,%{g,%{h}},i}"
> 
> lst = args[1];
> lst[1] = "";  /* get rid of leading percent-sign */
> lst = $string_utils:strip_chars(lst," ");
> lst = strsub(lst, ",", "\",\"");
> return $no_one:eval_d(lst);

Instead of:        {"a","b%{c,d}e","f","%{g,%{h}}","i"}
This code returns: {"a","b%{c","d}e","f","%{g","%{h}}","i"}
  Because, all the commas are sperated.  I don't want the commas inside 
%{}'s to be noticed.



References:

Home | Subject Index | Thread Index