My programs issues

pascal111 judas.the.messiah.111 at gmail.com
Thu Aug 11 20:30:54 UTC 2022


Next code receiving an input from the user and reprint it in 
capital letters with a separator between each letter, but I think 
that there is more to add or to modify the way this program 
working with:

'''D

module main;

import std.stdio;
import std.uni;
import std.string;
import std.algorithm;
import std.ascii;
import dcollect;
import std.range;


int main(string[] args)
{

     string user_word,
     sep_symbol;

again:

     write("Enter a word (\"none\" = exit): ");
     user_word=strip(readln());
     if(user_word=="none")
         return 0;

     write("Enter a seperator: ");
     sep_symbol=strip(readln());

     writeln;

     user_word.strtoupper.filter!(a=>!isNonCharacter(a)).
     map!only.joiner(sep_symbol).writeln;

     goto again;

}
'''

https://github.com/pascal111-fra/D/blob/main/proj08.d


More information about the Digitalmars-d-learn mailing list