Selectively replace multiple instances of a character within a string: Difference between revisions
Selectively replace multiple instances of a character within a string (view source)
Revision as of 01:25, 2 June 2022
, 2 years ago→{{header|J}}: more consistent indentation
(J) |
m (→{{header|J}}: more consistent indentation) |
||
Line 119:
=={{header|J}}==
<lang J> upd=: {{ x (n{I.y=m)} y }}
'ABCD' 'a' upd 0 1 3 4 'E' 'b' upd 0 'F' 'r' upd 1 'abracadabra'
AErBcadCbFD</lang>
|