What is the easiest method to limit the size of a string, so that when the string expands past a certain size after lots of concatenations . . .
s = s + Sting(“some more stringy goodness”);
. . the beginning of the string is deleted.
The reason I ask is that I have made a log viewer that updates itself as the string Value in a ValueTree has more information added. I want to limit the size of the log to show relatively recent information only. Can anyone think of an easy solution to save wheel reinvention?