Jump to content

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

(→‎{{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}}==
57

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.