prefix := string([]byte(verylongstring[:3]))
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit htt
Suppose you have code like this
// verylongstring may be several thousand bytes long
verylongstring := GetSomeVeryLongString()
prefix := verylongstring[:3]
prefixStore.StorePrefixForDurationOfApplication(prefix)
If I understand correctly, verylongstring cannot be garbage colle