2024-01-06 22:37:22 -05:00
|
|
|
;https://www.isharkfly.com/t/mumps-string-replacement/15228/1N I
|
2024-01-06 22:50:40 -05:00
|
|
|
N I
|
|
|
|
N TOK
|
|
|
|
N OSTR
|
2024-01-06 22:37:22 -05:00
|
|
|
SET count=0
|
2024-01-06 22:50:40 -05:00
|
|
|
F I=1:1:$L(str," ") S TOK=$P(str," ",I) S:TOK=old TOK=new S:TOK=new count=count+1 S OSTR=$G(OSTR)_" "_TOK
|
|
|
|
QUIT $E(OSTR,2,$LENGTH(OSTR))
|