StrSub

InstallShield 2020 » InstallScript Language Reference

The StrSub function copies part of the string specified by szString, beginning at the location specified by nStart. The parameter nLength specifies the number of characters to copy.

Syntax

StrSub ( svSubStr, szString, nStart, nLength );

Parameters

StrSub Parameters

Parameter

Description

svSubStr

Returns the substring copied from szString.

szString

Specifies the string from which the substring is to be copied.

nStart

Specifies an offset into szString that identifies the first character to be copied. Note that the position of the first character in szString is 0 (zero). If the value passed in nStart is equal to or greater than the length of szString, a null string (“”) is returned in svSubStr.

nLength

Specifies the number of characters to copy from szString. If this value specifies more characters than exist between nStart and the end of szString, all characters from nStart to the end of the string are returned in svSubStr.

Return Values

StrSub Return Values

Return Value

Description

X

Where X equals the number of characters in svSubStr.

See Also