reading UTF-8 character from stdin
Zoda
zoda at vuhuv.com
Tue Aug 5 13:23:27 UTC 2025
On Tuesday, 5 August 2025 at 12:57:29 UTC, Serg Gini wrote:
> On Tuesday, 5 August 2025 at 12:15:40 UTC, Zoda wrote:
>> Hi i need to read exactly one character from stdin, but i
>> could not found a proper way of doing it, how can i do that?
>
> ```d
> void main()
> {
> import std.stdio;
>
> char x;
> readf!"%c"(x);
> writeln(x);
> }
> ```
Sorry but it doesn't work properly in Windows, i tried.
More information about the Digitalmars-d
mailing list