I see this is a recurring rant (I apologize if this is a
repeating topic, I'm new to the forums). Here's an example of
something that should be simple in D but isn't:
enum string PATTERN = "abcd";
immutable char[10] repeatingPattern =
PATTERN.cycle().takeExactly(10).array();
The fact that fr
On Thursday, 15 June 2017 at 15:47:54 UTC, Jonathan Shamir wrote:
Also note I can't cast to char[] in compile time? What's the
reason for that?
Have a look at:
https://dlang.org/phobos/std_utf.html#byCodeUnit
https://dlang.org/phobos/std_utf.html#byChar
https://dlang.org/phobos/std_string.html
On Thursday, June 15, 2017 15:47:54 Jonathan Shamir via Digitalmars-d wrote:
> I see this is a recurring rant (I apologize if this is a
> repeating topic, I'm new to the forums). Here's an example of
> something that should be simple in D but isn't:
>
> enum string PATTERN = "abcd";
> immutable cha
On Thursday, 15 June 2017 at 15:50:42 UTC, Seb wrote:
On Thursday, 15 June 2017 at 15:47:54 UTC, Jonathan Shamir
wrote:
Also note I can't cast to char[] in compile time? What's the
reason for that?
Have a look at:
https://dlang.org/phobos/std_utf.html#byCodeUnit
https://dlang.org/phobos/std_u