auto d = Document("file:///home/projects/app.d"); d.setContent("import std.stdio;\nvoid main() {\r\n\twriteln(`hello world`);\r}"); // \r is not supported as line terminator assert(d.lineAt(2) == "\twriteln(`hello world`);\r}"); assert(d.eolAt(0) == EolType.lf); assert(d.eolAt(1) == EolType.crlf); assert(d.eolAt(2) == EolType.lf);
Returns how a line is terminated at the given 0-based line number. Defaults to LF for the last line / no line terminator.