String Functions

InstallShield 2015 » InstallScript Language Reference

The string functions provide the ability to manipulate string variables and literals. String functions behave similarly to the standard C language functions. The return values also follow the C language convention.

String Functions

Function

Description

CopyBytes

Copies a specified number of bytes from one string to another.

GetCArrayFromISArray

Returns a pointer to an array of pointers that point to the actual data of the specified array. This function does not allocate any additional memory, but it returns a pointer to the data in the existing array.

GetCHARArrayFromISStringArray

Returns a pointer to an array of pointers to ANSI character strings that corresponds to the wide character strings that are contained in the specified array.

GetDir

Deletes the drive designation from a path or fully qualified file name.

GetDisk

Retrieves the disk drive designation from a path or fully qualified file name.

NumToStr

Converts a number to a string.

ParsePath

Retrieves the drive, path, file name, or extension from a path.

StrAddLastSlash

Adds a trailing backslash to a path specification if it does not already have one.

StrCompare

Compares one string to another.

StrConvertSizeUnit

Returns the appropriate display string for the InstallScript size unit constant that is specified.

StrFind

Finds a string in another string.

StrFindEx

Determines whether the string passed in the parameter szFindMe is found within the string passed in the parameter szString; the function begins its search at the location specified by nStart.

StrGetTokens

Gets a token from a string based on specified delimiters.

StrLength

Like StrLengthChars, returns the number of characters in a given string variable (that is, the number of code units in the UTF-16-encoded string) up to the first null character.

StrLengthChars

Like StrLength, returns the number of characters in a given string variable (that is, the number of code units in the UTF-16-encoded string) up to the first null character.

StrPutTokens

Extracts list items from a specified string list and places them into the string that is specified by svString.

StrRemoveLastSlash

Removes the last backslash in a path string.

StrReplace

Searches svResult, beginning at the location specified by nStart, and replaces all found instances of szFind with szReplace.

StrSub

Returns a substring from a string.

STRTOCHAR

Returns the first character of a string as data of type CHAR.

StrToLower

Converts all alphabetic characters in string to lowercase.

StrToNum

Converts a string to a number.

StrToNumHex

Converts a string to a number—for example, 0x1A to 26.

StrToUpper

Converts all alphabetic characters in string to uppercase.

StrTrim

Removes the leading and trailing spaces and tabs from a string.