Hi All,
I'd like to know if there is a way to establish how many bytes a string required with a specific encoding without to convert it in bytes.
In few words I need to know lenInBytes but I want to avoid string to bytes conversion in order to reduce memory usage:
String s = "this is my string that can contain not ascii chars";
int lenInBytes = s.getBytes().length; // using default charset
Thanks a lot
ste