Selectively replace multiple instances of a character within a string: Difference between revisions

Content added Content deleted
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
Line 627: Line 627:
"AErBcadCbFD"
"AErBcadCbFD"
</pre>
</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}}==
=={{header|Python}}==