There’s something like that in all and every stdlib extension or alternative, including batteries and containers! Oftentimes it’s better to load a file in its entirety, so it won’t change (e.g. if a source file won’t fit in memory, a compiler will have trouble processing it!)
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How can I create an in_channel from a string? | 21 | 3256 | February 15, 2022 | |
| In Cygwin, OCaml outputs CRLF line endings but inputs only LFs leading to End_of_file | 4 | 865 | June 18, 2021 | |
| How do you read the lines of a text file… | 9 | 6078 | November 18, 2021 | |
| Help Review the new "File Manipulation" tutorial on OCaml.org | 29 | 2213 | April 17, 2024 | |
| Should we have a `String.rev` in `Stdlib`? | 36 | 3887 | January 25, 2022 |