From: tim::johnsons-web::com at: 20-Dec-2003 12:19
I'm a parse-a-phobic, and use it infrequently.
The following function uses 'parse dialect, and appears
to work, but I'd appreciate a critique from anyone on
it. Given my unfamiliarity with parse, you just might
be preventing me from chasing a bug sometime:
; Replace "%s" with members of a block. In the spirit
; of C, LISP, python format strings
printf: function[str[string!] subs[block!]]
[delims non-delims blk ndx ][
delims: charset "%s"
non-delims: complement delims
blk: copy 
copy txt some non-delims (
append blk txt
if ndx <= (length? subs)[
append blk subs/:ndx
ndx: ndx + 1
] ; end some
;I appreciate the input, also, there used to be a function
;posted at rebol.org that might have done something similar.
;Couldn't find it last I looked.
Tim Johnson <[tim--johnsons-web--com]>