I have a main string that looks like this:
my_main <- "ABCDEFGHIJ"
What I want to do is to sequentially replace at every position with another string:
my_insert <- "xxx" # the length could be varied from 1 up to length of my_main
The final result is a vector of strings that contain these:
xxxDEFGHIJ
AxxxEFGHIJ
ABxxxFGHIJ
ABCxxxGHIJ
ABCDxxxHIJ
ABCDExxxIJ
ABCDEFxxxJ
ABCDEFGxxx
If my_insert <- "xxxxxxxxxx", then the final output is vector of just 1 string xxxxxxxxxx.
How can I achieve that?