I have a `kotlinx.coroutines.io.ByteReadChannel`. ...
# coroutines
k
I have a
kotlinx.coroutines.io.ByteReadChannel
. How do I read a utf8String of certain length?
d
I don't think you can read from that.
k
You can read a utf8line but not a fixed size string?
Oh I meant read channel, I'll edit
d
Ah, you'll probably have to use a string builder and loop.
k
You can't even read a char though?
d
You can do this with
readUTF8LineTo
.
k
How, Doesn't that read a whole line?
d
You can give it a limit.
k
It throws an exception if it surpasses that limit iirc