RosettaCodeData/Task/FASTA-format/Smalltalk/fasta-format.st
2026-04-30 12:34:36 -04:00

10 lines
334 B
Smalltalk

FileLocator home / aFilename readStreamDo: [ :stream |
[ stream atEnd ] whileFalse: [
| line |
((line := stream nextLine) beginsWith: '>')
ifTrue: [
Transcript
cr;
show: (line copyFrom: 2 to: line size);
show: ': ' ]
ifFalse: [ Transcript show: line ] ] ]