Re: string mixup problem with stdin.byLine

2016-08-07 Thread Dave Akers via Digitalmars-d-learn
I do believe your problem is with the line... On Monday, 8 August 2016 at 02:44:20 UTC, torea wrote: string cleanLine = strip( cast(string)line ); It's casting a char[] to and immutable(char)[], causing the mutable buffer from byLine to be used as a string. what you want is...

Nested classes question?

2015-09-15 Thread Dave Akers via Digitalmars-d-learn
When a program exits and D's memory management is cleaning up calling all of the ~this's is there a reason it calls the outer class's ~this before the inner class's ~this? I was recently exploring the possibility of using https://github.com/bheads/d-leveldb and the example in the readme seg

Re: Multiple implicit type converters

2015-09-11 Thread Dave Akers via Digitalmars-d-learn
On Friday, 11 September 2015 at 19:34:46 UTC, Bahman Movaqar wrote: On Friday, 11 September 2015 at 16:33:52 UTC, Meta wrote: The only ways to get implicit conversion between two types in D are through `alias this`, inheritance, or implementing an interface. That's enough for me, I suppose.