[Issue 17149] to!int("42", 16, LetterCase.lower) does not compile

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Feb 5 23:03:19 PST 2017


https://issues.dlang.org/show_bug.cgi?id=17149

b2.temp at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com

--- Comment #1 from b2.temp at gmx.com ---
The letter case is only interesting in the "int2string" way. I don't see the
point of allowing it as parameter in the "string2int" way. The "string2int" way
handles mixed lower and upper case.

void main()
{
    import std.ascii;
    import std.conv;
    assert(to!int("AbCde", 16) == 0xabcde);
    assert(to!int("aBcdE", 16) == 0xabcde);
}

--


More information about the Digitalmars-d-bugs mailing list