# Function Reference

StringIsInt

Checks if a string is an integer.

StringIsInt ( "string" )

Parameters

string | The string to check.

Return Value

Success: | Returns 1.
Failure: | Returns 0 if string cannot be an integer.

Remarks

StringIsInt also returns 1 for non-string integer expressions; however, StringIsInt returns 0 for hexadecimal expressions such as "4ff0". The only punctuation allowed is either a plus or a minus at the beginning of the string.

Related

StringIsFloat, StringIsDigit, IsInt

Example

StringIsInt("+42") ;returns 1
StringIsInt("-00") ;returns 1
StringIsInt("1.0") ;returns 0 due to the decimal point
StringIsInt(1.0) ;returns 1 due to number-string conversion
StringIsInt("1+2") ;returns 0 due to plus sign