On 1/18/11 3:07 AM, Walter Bright wrote:
Andrei Alexandrescu wrote:I want to generalize the functionality in string's repeat and move it outside std.string. There is an obvious semantic clash here. If you say repeat("abc", 3) did you mean one string "abcabcabc" or three strings "abc", "abc", and "abc"?Just a thought: concat(repeat("abc",3)) yields "abcabcabc" ?
Actually we already have join. Fortunately repeat in std.range is lazy, which avoid multiple memory allocations. I only need to make join accept general ranges.
Question is, do we deprecate std.string.repeat? Andrei
