Utilities.StrToInt Method

Applies to TestComplete 15.69, last modified on November 13, 2024
This method is obsolete. See the Remarks section below.

Description

The Utilities.StrToInt method converts the string Str, which represents an integer-type number in either decimal or hexadecimal notation, into a number.

Declaration

Utilities.StrToInt(Str)

Str [in]    Required    String    
Result Integer

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

Str

Specifies the string to be converted into a number. If the source string does not represent a valid number, StrToInt raises an exception.

Result Value

The integer value to which the specified string has been converted.

Remarks

The StrToInt routine correctly recognizes hexadecimal numbers if they are prefixed with $ or 0x. To recognize a hexadecimal number with &H prefix that is adapted in VBScript, you should replace the prefix with $ or 0x.

This method is obsolete. It is supported for backward compatibility only. To convert a string to an integer number, use the aqConvert.StrToInt method.

See Also

StrToInt Method
IntToStr Method
Format Method
StrToFloat Method
StrToCurrency Method

Highlight search results