On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote:
char abc ="aabc "; auto abcaa = ((abc).dup).stripRight;
try: auto abcaa = stripRight(abc)just make sure you do NOT return that abcaa from the function or store it in an object. It still refers to the static array that does not outlive that function.
It is simply that these functions require a slice so it can resize it and you can't resize a static array.