Skip to content

Commit

Permalink
Merge pull request #694 from dart-windows/remove-deprecation
Browse files Browse the repository at this point in the history
Remove old deprecated method for unpacking strings
  • Loading branch information
timsneath committed May 7, 2023
2 parents fabf075 + 3ed64bd commit 5312872
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/src/extensions/unpack_utf16.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ import 'dart:ffi';
import 'package:ffi/ffi.dart';

extension Utf16Conversion on Pointer<Utf16> {
@Deprecated('Use the toDartString method in package:ffi 1.0 instead.')
String unpackString(int maxLength) {
final pathData = cast<Uint16>().asTypedList(maxLength);

var stringLength = pathData.indexOf(0);
if (stringLength == -1) {
stringLength = maxLength;
}

return String.fromCharCodes(pathData, 0, stringLength);
}

// Assumes an array of null-terminated strings, with the final
// element terminated with a second null.
List<String> unpackStringArray(int maxLength) {
Expand Down

0 comments on commit 5312872

Please sign in to comment.