Reading about D: few questions

Jonathan M Davis jmdavisProg at gmx.com
Fri Dec 23 15:22:27 PST 2011


On Friday, December 23, 2011 14:51:06 bearophile wrote:
> And sometimes inout helps.

Yeah, good point. I keep forgetting about inout, since it didn't work properly 
before. So, the best way to implement Ali's function would be

inout(char)[] endWithDot(inout(char)[] s)
{
     return s ~ '.';
}

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list