Replace two substrings in a string with the same `replace` call?

I just found that replace could be used to replace two bits of a vector as in

replace([1, 2, 1, 3], 1=>0, 2=>4)

Where the replacements are defined using Pair.

I tried that with a string instead of an integer vector, but that seems to fail.


ERROR: MethodError: no method matching replace(::String, ::Pair{String, String}, ::Pair{String, String})
Closest candidates are:
replace(::AbstractString, ::Pair, ::Pair) at set.jl:613
replace(::Any, ::Pair…; count) at set.jl:555
replace(::Union{Function, Type}, ::Pair, ::Pair; count) at set.jl:612

[1] replace(a::String, b::Pair{String, String}, c::Pair{String, String})
@ Base .\set.jl:613
[2] top-level scope
@ REPL[93]:1

Is there a specific reason for this to not be implemented / available / authorized ?
The obvious alternative would be replace(replace("aabbccdd","a"=>"y"),"c"=>"z"), but it does not feel quit clean.

What version of Julia are you using?

julia> versioninfo()
Julia Version 1.7.0-rc1
Commit 9eade6195e (2021-09-12 06:45 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, ivybridge)

julia> replace("aabbccdd","a"=>"y","c"=>"z")

Yep, I should have said that from the beginning, my bad.

Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, tigerlake)

I guess this has been corrected at some point between 1.6.2 and 1.7.0