D: byLine with remove (http) 文件?
D: byLine with remove (http) file?
我需要用D分割远程文件。
http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.csv
示例仅展示了如何使用 FS 上的文件。但是我可以使用远程文件吗?
您可以使用 std.net.curl.byLine
.
示例:
void main()
{
import std.net.curl, std.stdio;
string link = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.csv";
foreach (line; link.byLine())
{
writeln(line);
}
}
我需要用D分割远程文件。 http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.csv
示例仅展示了如何使用 FS 上的文件。但是我可以使用远程文件吗?
您可以使用 std.net.curl.byLine
.
示例:
void main()
{
import std.net.curl, std.stdio;
string link = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.csv";
foreach (line; link.byLine())
{
writeln(line);
}
}