|
|
|
|
|
by Ygg2
253 days ago
|
|
Theoretically yes. Practically there is character escaping. That kills any non-allocation dreams. Moment you have "Hi \uxxxx isn't the UTF nice?" you will probably have to allocate. If source is read-only you have to allocate. If source is mutable you have to waste CPU to rewrite the string. |
|
Same goes for other characters such as \n, \0, \t, \r, etc. All half in native byte representation.