> and get confused when memory blows up
this is fairly easy to spot with a profiler though
this is fairly easy to spot with a profiler though
The description in the Java 7 API for substring is "Returns a new string that is a substring of this string." That does not suggest any sharing with the parent string; it says "new string".
Anyway, I have moderately sized strings and am trying to analyze parts of them. And I don't want to make copies for the sake of analysis. This has to be quite common as well.