Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WindowsTrimStringEnd function

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

Syntax


HRESULT WINAPI WindowsTrimStringEnd(
  _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 end 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

Show:
© 2014 Microsoft. All rights reserved.