EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

WindowsSubstring function

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

Syntax


HRESULT WINAPI WindowsSubstring(
  _In_   HSTRING string,
  _In_   UINT32 startIndex,
  _Out_  HSTRING *newString
);

Parameters

string [in]

Type: HSTRING

The original string.

startIndex [in]

Type: UINT32

The zero-based starting character position of a substring in this instance.

newString [out]

Type: HSTRING*

A string that is equivalent to the substring that begins at startIndex in string, or NULL if startIndex is equal to the length of string.

Return value

Type: HRESULT

This function can return one of these values.

Return codeDescription
S_OK

The substring was created successfully.

E_INVALIDARG

newString is NULL.

E_BOUNDS

startIndex is greater than the length of string.

E_OUTOFMEMORY

Failed to allocate the new substring.

 

Remarks

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Winstring.h

 

 

커뮤니티 추가 항목

표시:
© 2014 Microsoft