set-nth

Q&A's, tips, howto's

set-nth

Postby eddier » Wed Dec 10, 2003 8:06 pm

(nth pos str)
gets a character a position pos in a string str

should

(set-nth 1 "abcd" "k") => "akcd"

?

Eddie
eddier
 
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Postby Lutz » Wed Dec 10, 2003 9:38 pm

sounds reasonable, this should also work:

(set-nth 1 "abcd" (append $0 $0)) => "abbcd"

may be to late for 7.4.0 but for 8.0

Lutz
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests

cron