开发者

Erlang, reading a file with character offset

开发者 https://www.devze.com 2023-01-23 11:56 出处:网络
I have code to find a specific occurance of text in a file and give me an offset so I know where this occurance end. Now I want to read the file from that offset to the end of the file. The file conta

I have code to find a specific occurance of text in a file and give me an offset so I know where this occurance end. Now I want to read the file from that offset to the end of the file. The file contains binary data as well as text. How do I do this in E开发者_StackOverflow社区rlang?


Use pread. (See Erlang documentation on the file module). You have to take care of any character encoding yourself as the function deals with only bytes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号