Re: next!T

2014-06-06 Thread Chris Nicholson-Sauls via Digitalmars-d-learn
On Saturday, 7 June 2014 at 03:21:49 UTC, Andrew Edwards wrote: Wow. Sometimes you really cannot see the things you type no matter how long you stare at it. Thank you soo much. No problem. I only noticed when I re-typed it by hand to study the flow, and instinctively added the else out of

Re: next!T

2014-06-06 Thread Andrew Edwards via Digitalmars-d-learn
On 6/6/14, 10:57 PM, Chris Nicholson-Sauls wrote: On Saturday, 7 June 2014 at 02:23:18 UTC, Andrew Edwards wrote: Any assistance/advice is appreciated. Thanks, Andrew I got it working here by putting an else before the second static-if. Wow. Sometimes you really cannot see the things you

Re: next!T

2014-06-06 Thread Chris Nicholson-Sauls via Digitalmars-d-learn
On Saturday, 7 June 2014 at 02:23:18 UTC, Andrew Edwards wrote: This function now works for all types except dstring. This remains a problem I cannot figure out. The error code is as follows: $ rdmd -unittest textnext /usr/share/dmd/src/phobos/std/conv.d(3293): Error: cannot modify immutabl

Re: next!T

2014-06-06 Thread Andrew Edwards via Digitalmars-d-learn
se in the examples. Would appreciate a sanity check. Is there something that I should be thinking about am obviously not? Comments/criticisms appreciated. io.d module io; public import std.stdio; private string buffer; auto next(T)() { import std.traits; i

Re: next!T

2014-05-26 Thread Andrew Edwards via Digitalmars-d-learn
On 5/25/14, 10:12 PM, Ali Çehreli wrote: On 05/25/2014 05:21 PM, Andrew Edwards wrote: Hello All, I wrote the following convenience functions to aid in my studies. Unfortunately, I'm using Java books (Ali I will get to yours soon enough) so the need was necessitated by the frequency of use in t

Re: next!T

2014-05-25 Thread Ali Çehreli via Digitalmars-d-learn
anity check. Is there something that I should be thinking about am obviously not? Comments/criticisms appreciated. io.d module io; public import std.stdio; private string buffer; auto next(T)() { import std.traits; import std.conv; import std.string;

next!T

2014-05-25 Thread Andrew Edwards via Digitalmars-d-learn
ld be thinking about am obviously not? Comments/criticisms appreciated. io.d module io; public import std.stdio; private string buffer; auto next(T)() { import std.traits; import std.conv; import std.string; if(buffer.length