Also, suppse i dont want any ascii/unicode/utf8 conversions, i’m just doing something with the raw data and then i want to put it back without any subsequent conversion.
Well, not sure I’d recommend messing with the data in-place, unless you’re definitely not going to change its length or damage the utf-8 encoding. Best to create a memory block of your own containing your new data (i.e. a HeapBlock of CharPointer_UTF8, CharPointer_UTF16, etc), and then construct a string from the result.
To get the raw data out, toUTF8().getAddress() will get you a pointer to the data without doing any conversion work - it’s safe to assume strings will always be stored as utf-8 internally.
That’s what i need to know, thanks. No i’m not changing the data in place, just that i wanted to get raw data out, change it and make a new string from it without any internal conversion.