3 ms·
Couldn't the substring copying be deferred until the parent string is ready to be GC'd? In the common case of a short-lived substring, no string copies are nece
by cpeterso 13y ago
Couldn't the substring copying be deferred until the parent string is ready to be GC'd? In the common case of a short-lived substring, no string copies are necessary. Only if the substring outlives the parent string would a copy be necessary.