the code from: Genie howto repeat a string N times as an string arrayGenie howto repeat a string N times as an string array
def repeatwithsep (e: string, n: int, separator: string): string
var elen = e.length;
var slen = separator.length;
var a = new StringBuilder.sized ((elen * n) + (slen * (n - 1)) + 1);
for var i = 0 to (n - 1)
if i != 0
a.append_len (separator, slen)
a.append_len (e, elen)
return (owned) a.str
var a is a local variable, when a goes out of scope, it will be destroyed. why this function
return (owned) a.str
what is the difference between
return a.str
return (owned) a.str
what is the benefit of (owned)