convertUint16ArrayToString function

String convertUint16ArrayToString(
  1. Pointer<Uint16> arrayPointer
)

Implementation

String convertUint16ArrayToString(Pointer<Uint16> arrayPointer) {
  int length = 0;
  while (arrayPointer.elementAt(length).value != 0) {
    length++;
  }

  List<int> codeUnits = arrayPointer.asTypedList(length);
  String result = String.fromCharCodes(codeUnits);
  return result;
}