Multiple replacing emoji decimal to emoji hexadecimal use array swift 4
This below example how to replace data You need to loop, looking to see what the range of the substring
var s = "The Pep Boys are §§§, §§§, and §§§."
var s = "The Pep Boys are §§§, §§§, and §§§."
var arr = ["Manny", "Moe", "Jack"]
while let r = s.range(of:"§§§") {
s.replaceSubrange(r, with: arr.removeFirst())
}
print("\(s)") // The Pep Boys are Manny, Moe, and Jack.
Or use range
Or use range
var s = "The Pep Boys are :§§§;, :§§§;, and :§§§;."
var arr = ["Manny", "Moe", "
while let r = s.range(of: "\\:(.*?)\\;", options: .regularExpression, range: nil, locale: s.replaceSubrange(r, with: arr.removeFirst())
}
print("\(s)")