isValidUTF8 function

bool isValidUTF8(
  1. Uint8List buf
)

Implementation

bool isValidUTF8(Uint8List buf) {
  return u8aEq(
      buf.u8aToString(useDartEncode: true).plainToU8a(useDartEncode: true),
      buf);
}