CTFE Status 2

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Wed Mar 15 06:49:43 PDT 2017


On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote:
> [ ... ]

String Slicing is in!
The following code will now compile with newCTFE.

string slice(string s, uint lwr, uint upr)
{
     return s[lwr .. upr];
}

static assert(slice("Hello World", 6, 11) == "World");



More information about the Digitalmars-d mailing list