WindowsSubstringWithSpecifiedLength function Null safety winrt

int WindowsSubstringWithSpecifiedLength(
  1. int string,
  2. int startIndex,
  3. int length,
  4. Pointer<IntPtr> newString
)

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

HRESULT WindowsSubstringWithSpecifiedLength(
  HSTRING string,
  UINT32  startIndex,
  UINT32  length,
  HSTRING *newString
);

Implementation

int WindowsSubstringWithSpecifiedLength(
    int string, int startIndex, int length, Pointer<IntPtr> newString) {
  final _WindowsSubstringWithSpecifiedLength =
      _api_ms_win_core_winrt_string_l1_1_0.lookupFunction<
              Int32 Function(IntPtr string, Uint32 startIndex, Uint32 length,
                  Pointer<IntPtr> newString),
              int Function(int string, int startIndex, int length,
                  Pointer<IntPtr> newString)>(
          'WindowsSubstringWithSpecifiedLength');
  return _WindowsSubstringWithSpecifiedLength(
      string, startIndex, length, newString);
}