dart-exercism/rna-transcription/lib/rna_transcription.dart

13 lines
216 B
Dart
Raw Normal View History

2024-10-14 11:37:17 +02:00
class RnaTranscription {
Map<String, String> _rnaMap = {
'A': 'U',
'C': 'G',
'G': 'C',
'T': 'A',
};
String toRna(String dna) {
return dna.split("").map((dna) => _rnaMap[dna]).join();
}
}