Reputation: 35
I need to read characters from a file in SML. I have this piece of code for reading integers:
fun readInt input = Option.valOf (TextIO.scanStream (Int.scan StringCvt.DEC) input)
Is there something equivalent for characters? I've seen that there is Char.scan
but I am not very sure on how to use it.
Thanx in advance !!
Upvotes: 2
Views: 838