Reflections on isPalindrome

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 27 05:10:57 PDT 2014


On Sunday, 26 October 2014 at 20:38:29 UTC, Nordlöw wrote:
> On Friday, 24 October 2014 at 22:29:12 UTC, Peter Alexander 
> wrote:
>>> Further, I would like to extend isPalindrome() with a minimum 
>>> length argument minLength that for string and wstring does
>
> I extended my algorithm with a minLength argument 
> https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L774

You could add an early `return false;` if the range has length 
and it is less than minLength.


More information about the Digitalmars-d-learn mailing list