assertEncodedMaxLength function
Asserts that the encoded byte length of value is less than or equal to max.
Implementation
void assertEncodedMaxLength(
final String value,
final BufferEncoding encoding,
final int max,
) {
assertMaxLength(Buffer.fromString(value, encoding).length, max);
}