[Accepted] Swift
\nclass Solution {\n    func numUniqueEmails(_ emails: [String]) -> Int {\n        \n        func bare(_ s: String) -> String {\n            let p = s.component
```\nclass Solution {\n    func numUniqueEmails(_ emails: [String]) -> Int {\n        \n        func bare(_ s: String) -> String {\n            let p = s.components(separatedBy: "@")\n            let n = p[0]\n                .components(separatedBy: "+")\n                .first!\n                .components(separatedBy: ".")\n                .joined()\n            return "\\(n)@\\(p[1])"\n        }\n        \n        return Set(emails.map(bare)).count\n    }\n}\n```
['Swift']