Convert a hex color string into r,g,b components.

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 11 15:13:55 PDT 2015


On Tuesday, 11 August 2015 at 22:11:51 UTC, Marcin Szymczak wrote:
> /usr/include/dlang/dmd/std/conv.d(295): Error: template 
> std.conv.toImpl cannot deduce function from argument types 
> !(ubyte)(Take!string, int), candidates are:


I don't think to! with the base given works on the chunked 
ranges, it just works on regular strings.

> I would really love to solve this problem using ranges, because 
> i am learning how to use them. Unfortunately even such a simple 
> task seems so hard for me ;(

meh, I'd just slice the string.


More information about the Digitalmars-d-learn mailing list