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"); }
pineapple via Digitalmars-d-learn Mon, 24 Jul 2017 02:22:02 -0700
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"); }