String Replacement


Another of those tedious chores that pollute applications - you could write your own code, but it's probably easier to use the various functions in the supplied <dfns> workspace...

      ss ⎕a 'ABC' 'DEF'
DEFDEFGHIJKLMNOPQRSTUVWXYZ
      ss (2 26⍴⎕a) 'ABC' 'DEF'
DEFDEFGHIJKLMNOPQRSTUVWXYZDEFDEFGHIJKLMNOPQRSTUVWXYZ
      ssmat (2 26⍴⎕a) 'ABC' 'DEF'
DEFDEFGHIJKLMNOPQRSTUVWXYZ
DEFDEFGHIJKLMNOPQRSTUVWXYZ
      ssword 'a banana is an type of fruit' 'an' 'a'
a banana is a type of fruit
      'ABC' 'DEF' subs ⎕a
DEFDEFGHIJKLMNOPQRSTUVWXYZ

Notes:

Page created 20 April 2009.
Copyright © Dogon Research 2009.