IDataFunctions_4_0::CleanString

Ee810390.c++_off(en-US,CS.10).gifEe810390.vb_on(en-US,CS.10).gif

Use this method to process a string, based on the default or specified locale. The string processing can include stripping out leading and trailing white spaces, modifying string case, and validating that the length of the string falls within a given range.

Definition

HRESULT IDataFunctions_4_0::CleanString(VARIANTvtInput,VARIANTvtMinLen,VARIANTvtMaxLen,VARIANTvtStripWhite,VARIANTvtStripReturn,VARIANTvtCase,VARIANTvtLocale,VARIANT*pvarOutput);

Parameters

vtInput

[in] A VARIANT that contains the text of the string to process.

vtMinLen

[in] A VARIANT that contains the minimum length against which the length of the input string will be validated. The default value for this parameter is zero (0).

vtMaxLen

[in] A VARIANT that contains the maximum length against which the length of the input string will be validated. The default value for this parameter is no limit.

vtStripWhite

[in] A VARIANT that contains a Boolean value that indicates whether leading and trailing white spaces should be stripped from the input string. The default value is TRUE.

vtStripReturn

[in] A VARIANT that contains the Boolean value that indicates whether the carriage returns contained anywhere in the input string should be stripped. The default value is TRUE.

vtCase

[in] A VARIANT that specifies any conversions to the case of the input string. The default value for this parameter is zero (0), which results in no modification to the case of the input string. If this parameter is set to one (1), the input string is converted to uppercase. If this parameter is set to two (2), the input string is converted to lowercase.

vtLocale

[in] A VARIANT that specifies the locale to use when processing the input string. If this parameter is not specified, the value of the Locale property of the DataFunctions object is used.

pvarOutput

[out, retval] A pointer used to return a VARIANT that contains the processed string.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

The pvarOutput parameter contains valid data only if the method completes successfully.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

DataFunctions Object

IDataFunctions_4_0::get_Locale, put_Locale

IMSCSPage_3_0::RequestString


All rights reserved.