diff --git a/routines/StringReplacement.m b/routines/StringReplacement.m new file mode 100644 index 0000000..50e5cc0 --- /dev/null +++ b/routines/StringReplacement.m @@ -0,0 +1,6 @@ + N I + N TOK + N OSTR + S count=0 + 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))