StringExtension extension

Extension on String for converting Dart strings to Win32 and COM string representations.

All methods in this extension allocate native memory and return lightweight wrapper types around raw pointers. Ownership is transferred to the caller unless an Arena is used.

on

Methods

toBstr() BSTR

Available on String, provided by the StringExtension extension

Converts this Dart string to a COM BSTR.
toHstring() HSTRING

Available on String, provided by the StringExtension extension

Converts this Dart string to a WinRT HSTRING.
toPcstr({Allocator allocator = adaptiveMalloc}) PCSTR

Available on String, provided by the StringExtension extension

Converts this Dart string to a null-terminated string of 8-bit Windows (ANSI) characters (PCSTR).
toPcwstr({Allocator allocator = adaptiveMalloc}) PCWSTR

Available on String, provided by the StringExtension extension

Converts this Dart string to a null-terminated UTF-16 string (PCWSTR).
toPstr({Allocator allocator = adaptiveMalloc}) PSTR

Available on String, provided by the StringExtension extension

Converts this Dart string to a null-terminated string of 8-bit Windows (ANSI) characters (PSTR).
toPwstr({Allocator allocator = adaptiveMalloc}) PWSTR

Available on String, provided by the StringExtension extension

Converts this Dart string to a null-terminated UTF-16 string (PWSTR).