WindowsGetStringLen function Null safety winrt

int WindowsGetStringLen(
  1. int string
)

Gets the length, in Unicode characters, of the specified string.

UINT32 WindowsGetStringLen(
  HSTRING string
);

Implementation

int WindowsGetStringLen(int string) {
  final _WindowsGetStringLen = _api_ms_win_core_winrt_string_l1_1_0
      .lookupFunction<Uint32 Function(IntPtr string), int Function(int string)>(
          'WindowsGetStringLen');
  return _WindowsGetStringLen(string);
}