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

# Re: Interesting code...

- Date: Sun, 14 Jan 1996 12:53:47 PST
- From:
- Cc: moo-cows@parc.xerox.com
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=US-ASCII
- In-Reply-To: <Pine.SOL.3.91.960114021101.22903A-100000@gamera.syr.edu> from "Kipp the Kidd" at Jan 13, 96 11:12:37 pm

    Kipp the Kidd drew these hieroglyphs:
    >
    > Can anyone come up with some 1.8.0 MOO code that, when given this:
    >
    >    "%{a,b%{c,d}e,f,%{g,%{h}},i}"
    >
    > Returns this:
    >
    > {"a","b%{c,d}e","f","%{g,%{h}}","i"}

    Here's what I pulled off the top of my head.  I'm assuming there are
    no embedded commas or spaces in your list items.  I haven't tested it
    but it feels right.

    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);

    > I've got an extremely tick-greedy version, but of course, I don't want to
    > use that...  Could anyone do better?  Pavel? :)

    Ask us and let Pavel do server work, 'kay?

Follow-Ups:

- Re: Interesting code...

- From: Kipp the Kidd <mcmudge@mailbox.syr.edu>

References:

- Interesting code...

- From: Kipp the Kidd <mcmudge@mailbox.syr.edu>

- Prev: Re: Interesting code...
- Next: Re: Interesting code...
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index