www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Read a text file at once for regex searching

reply Paul <phshaffer gmail.com> writes:
I've been looking through our Library documentation and having 
trouble finding what I want.  **I'd like to read a text file in 
all at once** and do some searching and analytics on it instead 
of reading it bit by bit or line by line.  Do we have some such 
function in our std library?

Thanks in advance.
Mar 20 2023
parent reply Adam D Ruppe <destructionator gmail.com> writes:
On Monday, 20 March 2023 at 17:42:17 UTC, Paul wrote:
 Do we have some such function in our std library?
Try static import std.file; string s = std.file.readText("filename.txt"); http://phobos.dpldocs.info/std.file.readText.html
Mar 20 2023
parent Paul <phshaffer gmail.com> writes:
On Monday, 20 March 2023 at 17:47:19 UTC, Adam D Ruppe wrote:
 On Monday, 20 March 2023 at 17:42:17 UTC, Paul wrote:
 Do we have some such function in our std library?
Try static import std.file; string s = std.file.readText("filename.txt"); http://phobos.dpldocs.info/std.file.readText.html
Thanks Adam.
Mar 20 2023