How to read a text file¶
Use $::io::nread with the file path as a character vector:
The result is a character vector containing the entire file contents, including any newline characters.
You can also call it without importing:
Check the length¶
This returns the number of characters in the file.
See also: Write a text file, Standard library -- I/O