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 19:46, 12 November 2022
, 1 year ago→{{header|Python}}
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
|||
Line 627:
"AErBcadCbFD"
</pre>
=={{header|Phixmonti}}==
<syntaxhighlight lang="Phixmonti">/# Rosetta Code problem: https://rosettacode.org/wiki/Selectively_replace_multiple_instances_of_a_character_within_a_string
by Galileo, 11/2022 #/
include ..\Utilitys.pmt
"ABaCD" var A "Eb" var B "rF" var R
"abracadabra" len for >ps
tps get tochar
dup "a" == if drop A pop var A tps set else
dup "b" == if drop B pop var B tps set else
"r" == if R pop var R tps set
endif endif endif
ps> drop
endfor
pstack</syntaxhighlight>
{{out}}
<pre>
["AErBcadCbFD"]
=== Press any key to exit ===</pre>
=={{header|Python}}==
|