getBinarySize function

int getBinarySize(
  1. String str
)

Get the binary size of a string

Implementation

int getBinarySize(String str) {
  ArgumentError.checkNotNull(str);

  return utf8.encode(str).length;
}