Multiway string substitution

function multisbs(str,sstr, s)
    res=String[]
    fp=findfirst(str, s)
    while !isnothing(fp)
        push!(res,s[1:first(fp)-1]*sstr*s[last(fp)+1:end])
       #push!(res,s[1:fp.start-1]*sstr*s[fp.stop+1:end])
        fp=findnext(str, s,first(fp)+1)
    end
    res
end

julia> multisbs("BBA","A","BBABBA")
2-element Vector{String}:
 "ABBA"
 "BBAA"

julia> multisbs("BB","A","BBABBA")
2-element Vector{String}:
 "AABBA"
 "BBAAA"

julia> multisbs("BB","A","BBBBA")
3-element Vector{String}:
 "ABBA"
 "BABA"
 "BBAA"

julia> multisbs("BB","A","BBBBB")
4-element Vector{String}:
 "ABBB"
 "BABB"
 "BBAB"
 "BBBA"