It is worth noting too that mach's map function will not behave this way; UTF encoding and decoding is instructed explicitly and is not done implicitly like in phobos.

https://github.com/pineapplemachine/mach.d

    import mach.range : map, asarray;
    import mach.text.ascii : toupper;

    void main(){
        char[] x = ['h', 'e', 'l', 'l', 'o'];
        char[] y = x.map!toupper.asarray();
        assert(y == "HELLO");
    }

Reply via email to