Trying to find the exact format for doing this.
I have a textField user input,
I want to take that input and find multiple occurrences and replace each unique occu
I am still not sure if this is exactly what you are asking but if I understood correctly you can zip your collections and iterate the resulting tuples:
var result = "example"
zip(["e", "x", "a", "m", "p", "l", "e"],["1", "3", "2", "8", "5", "7"]).forEach {
result = result.replacingOccurrences(of: $0, with: $1, options: .literal)
}
result // 1328571