digitalmars.D.learn - formattedRead string without allocation?
- Steven Schveighoffer (11/11) Feb 24 I want to use formattedRead to enforce a certain format, and easily
I want to use formattedRead to enforce a certain format, and easily parse out the data from a string. But if I do: string s = "123:abc:123"; string y; assert(s.formattedRead!"123:%s:123"(y) == 1); y is now a newly-allocated string, not a slice of the input. In the case of parsing strings out of strings that aren't going away, it would be much more advantageous to simply slice the input. Is there something that does this? -Steve