mirror of https://github.com/sunface/rust-course
321 B
321 B
Reading input as Raw Bytes
The built-in String type uses UTF-8 internally, which adds a small, but nonzero overhead caused by UTF-8 validation when you read input into it. If you just want to process input bytes without worrying about UTF-8 (for example if you handle ASCII text), you can use BufRead::read_until
.