Expand Minimize

WindowsTrimStringStart function

Removes all leading occurrences of a specified set of characters from the source string.

Syntax


HRESULT WINAPI WindowsTrimStringStart(
  _In_   HSTRING string,
  _In_   HSTRING trimString,
  _Out_  HSTRING *newString
);

Parameters

string [in]

Type: HSTRING

The string to be trimmed.

trimString [in]

Type: HSTRING

The characters to remove from string.

newString [out]

Type: HSTRING*

The string that remains after all occurrences of characters in the trimString parameter are removed from the start of string, or NULL if trimString contains all of the characters in string.

Return value

Type: HRESULT

This function can return one of these values.

Return codeDescription
S_OK

The trimmed string was created successfully.

E_INVALIDARG

newString is NULL, or trimString is empty.

E_OUTOFMEMORY

Failed to allocate the trimmed string.

 

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft