Range functions expand char to dchar

Freddy via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 9 11:56:24 PDT 2015


On Tuesday, 8 September 2015 at 18:28:40 UTC, Matt Kline wrote:
> A bit verbose, but I suppose that will do.
You could use map
---
import std.algorithm : map;
import std.utf : byCodeUnit;
import std.array : array;

auto arr = ["foo", "bar", "baz"].map!(a => a.byCodeUnit).array;
---


More information about the Digitalmars-d mailing list