WindowsTrimStringEnd function (winstring.h)
Removes all trailing occurrences of a specified set of characters from the source string.
Syntax
HRESULT WindowsTrimStringEnd(
HSTRING string,
HSTRING trimString,
HSTRING *newString
);
Parameters
string
Type: [in] HSTRING
The string to be trimmed.
trimString
Type: [in] HSTRING
The characters to remove from string.
newString
Type: [out] 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 code | Description |
---|---|
|
The trimmed string was created successfully. |
|
newString is NULL, or trimString is empty. |
|
Failed to allocate the trimmed string. |
Remarks
Each call to the WindowsTrimStringEnd function must be matched with a corresponding call to WindowsDeleteString.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | winstring.h |