Functions

src/CustomActions/StringTools/StringToolsImpl.h File Reference

Go to the source code of this file.

Functions

CA_API UINT __stdcall String_Replace (MSIHANDLE hInstall)
 Replace a string.
CA_API UINT __stdcall String_Trim (MSIHANDLE hInstall)
 Trim a string.
CA_API UINT __stdcall String_LTrim (MSIHANDLE hInstall)
 Trim a string from left.
CA_API UINT __stdcall String_RTrim (MSIHANDLE hInstall)
 Trim a string from right.
CA_API UINT __stdcall Regex_Match (MSIHANDLE hInstall)
 Regex_Match.
CA_API UINT __stdcall Regex_Replace (MSIHANDLE hInstall)
 Regex_Replace.
CA_API UINT __stdcall String_ToLower (MSIHANDLE hInstall)
 Converts string to lower case.
CA_API UINT __stdcall String_ToUpper (MSIHANDLE hInstall)
 Converts string to upper case.

Function Documentation

CA_API UINT __stdcall Regex_Match ( MSIHANDLE  hInstall)

Regex_Match.

Returns 1 if the specified regular expression REGEX_MATCH_EXPRESSION matches the whole of the input specified in REGEX_MATCH_INPUT_STRING.

Parameters:
REGEX_MATCH_INPUT_STRINGinput string
REGEX_MATCH_EXPRESSIONregular expression to use in the match
Returns:
REGEX_MATCH_RESULT 1 if it matched, 0 otherwise
CA_API UINT __stdcall Regex_Replace ( MSIHANDLE  hInstall)

Regex_Replace.

Searches through the string REGEX_REPLACE_INPUT_STRING finding all the matches to the regular expression specified in REGEX_REPLACE_EXPRESSION. For each match it format the string using REGEX_REPLACE_FORMAT

Parameters:
REGEX_REPLACE_INPUT_STRINGinput string
REGEX_REPLACE_EXPRESSIONregular expression to use in the replace
REGEX_REPLACE_FORMATreplacement format string
Returns:
REGEX_MATCH_RESULT replacement result
CA_API UINT __stdcall String_LTrim ( MSIHANDLE  hInstall)

Trim a string from left.

This performs left trim. For example leading zeros in a string.

Parameters:
STRING_LTRIM_INPUTstring to trim
STRING_LTRIM_WHITESPACESthe whitespace to trim. Defaults to " " and tab characters
STRING_LTRIM_RESULTthe resulting string
CA_API UINT __stdcall String_Replace ( MSIHANDLE  hInstall)

Replace a string.

Replaces the value in STRING_REPLACE_FROM by the value in STRING_REPLACE_TO in a string specified by STRING_VALUE_FROM and puts the result in STRING_VALUE_TO along with the number of occurences replaced in STRING_REPLACE_COUNT. This function doesn't do anything special about empty strings and behaves like a regular string replacement.

Parameters:
STRING_VALUE_FROMstring to replace
STRING_REPLACE_FROMsource string to find in STRING_VALUE
STRING_REPLACE_TOtarget string to replace occurences of STRING_REPLACE_FROM with
Returns:
STRING_REPLACE_COUNT number of occurrences replaced
STRING_VALUE_TO replacement result
CA_API UINT __stdcall String_RTrim ( MSIHANDLE  hInstall)

Trim a string from right.

This performs right trim.

Parameters:
STRING_RTRIM_INPUTstring to trim
STRING_RTRIM_WHITESPACESthe whitespace to trim. Defaults to " " and tab characters
STRING_RTRIM_RESULTthe resulting string
CA_API UINT __stdcall String_ToLower ( MSIHANDLE  hInstall)

Converts string to lower case.

Converts STRING_TOLOWER_INPUT string to lower case, output goes into STRING_TOLOWER_RESULT.

Parameters:
STRING_TOLOWER_INPUTinput string
Returns:
STRING_TOLOWER_RESULT conversion result, lowercase
CA_API UINT __stdcall String_ToUpper ( MSIHANDLE  hInstall)

Converts string to upper case.

Converts STRING_TOUPPER_INPUT string to upper case, output goes into STRING_TOUPPER_RESULT.

Parameters:
STRING_TOUPPER_INPUTinput string
Returns:
STRING_TOUPPER_RESULT conversion result, uppercase
CA_API UINT __stdcall String_Trim ( MSIHANDLE  hInstall)

Trim a string.

This performs left and right trim.

Parameters:
STRING_TRIM_INPUTstring to trim
STRING_TRIM_WHITESPACESthe whitespace to trim. Defaults to " " and tab characters
STRING_TRIM_RESULTthe resulting string


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com