December 28, 2022 [Issue 23588] New: Std lacks a way to read Unicode from a file expect by line | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23588 Issue ID: 23588 Summary: Std lacks a way to read Unicode from a file expect by line Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: crazymonkyyy@gmail.com ``` struct filebydchar{ dstring me; alias me this; this(string s){ import std.file; import std.conv; me=readText(s).to!dstring; } int i; dchar front(){ return me[i]; } void popFront(){ i++; } bool empty(){ return i>=me.length; } } ``` I would expect a `std.File.byDChar` rather then what may be poor attempts at implementing unicode logic on some c interface -- |
Copyright © 1999-2021 by the D Language Foundation