WsTrimXmlWhitespace function (webservices.h)

Removes leading and trailing whitespace from a sequence of characters.

Syntax

HRESULT WsTrimXmlWhitespace(
                 WCHAR    *chars,
  [in]           ULONG    charCount,
                 WCHAR    **trimmedChars,
  [out]          ULONG    *trimmedCount,
  [in, optional] WS_ERROR *error
);

Parameters

chars

The string to be trimmed.

[in] charCount

The length of the string to be trimmed.

trimmedChars

Returns a pointer into the original string starting at the first non-whitespace character.

[out] trimmedCount

Returns the length of the trimmed string.

[in, optional] error

Specifies where additional error information should be stored if the function fails.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The function returns a pointer into the original string. The original string passed in is not modified.

XML defines whitespace as characters 9 (0x9), 10 (0xA), 13 (0xD), and 32 (0x20).

Requirements

   
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll