Robert
02/05/2019, 9:27 PMappend
but no method prepend
, that does not make much sense to me. Anyone knows why there's none?Ruckus
02/05/2019, 9:31 PMinsert(0, ...)
(or any other index for that matter)alex
02/05/2019, 9:32 PMRobert
02/05/2019, 9:34 PMinsert
for other than nativealex
02/05/2019, 9:37 PMtypealias StringBuilder = StringBuilder
Robert
02/05/2019, 9:39 PMkd
02/05/2019, 9:53 PMRobert
02/05/2019, 11:04 PMDico
02/06/2019, 5:35 AMJay
02/08/2019, 10:19 AMDico
02/08/2019, 10:58 AMRobert
02/08/2019, 9:24 PMStringBuilder just isn't intended to be used like that.How do you figure?
You can do it though with insert.Problem is, there is no insert..
For a silly analogy - you don't move half of a house over after you've built it to make space for the other.That's a strange analogy imho, which is not about the use case; we want to prepend, that's not the discussion. If the implementation for 'insert'/'prepend' is to move the house, then maybe the implementation is inefficient, but I agree with @Jay that it is strange to leave it out because of that. What about reverse + append + reverse? Even more inefficient I'd think?
Dico
02/08/2019, 11:20 PM