DEV Community

Discussion on: Daily Challenge #212 - DNA to RNA

Collapse
 
kesprit profile image
kesprit

My Swift solution :

func DNAtoRNA(string: String) -> String {
    String(string.map { $0 == "T" ? "U" : $0 })
}