I am a beginner developer and I want to replace occurrence of both gmail.com and icloud.com. Ive tried using:
let email =
vm.chatUser?.email.replacingOccurrences(of:
"@gmail.com", "@icloud.com", with: "") ?? ""
but its giving me an error.