getBinarySize function

int getBinarySize(
  1. String str
)

Get the binary size of a string

Implementation

int getBinarySize(String str) {
  return utf8.encode(str).length;
}