WindowsSubstring function Null safety winrt

int WindowsSubstring(
  1. int string,
  2. int startIndex,
  3. Pointer<IntPtr> newString

Retrieves a substring from the specified string. The substring starts at the specified character position.

HRESULT WindowsSubstring(
  HSTRING string,
  UINT32  startIndex,
  HSTRING *newString


int WindowsSubstring(int string, int startIndex, Pointer<IntPtr> newString) {
  final _WindowsSubstring = _api_ms_win_core_winrt_string_l1_1_0.lookupFunction<
      Int32 Function(
          IntPtr string, Uint32 startIndex, Pointer<IntPtr> newString),
      int Function(int string, int startIndex,
          Pointer<IntPtr> newString)>('WindowsSubstring');
  return _WindowsSubstring(string, startIndex, newString);