Skip to main content

string.tofloat()

Converts a string of numeric characters to a float value

Availability

Device + Agent

Returns

Float — the value of the numeric string

Description

This method returns the float value represented by the target string, which must contain only numeric characters, and the minus and plus symbols to indicate negative and positive values, respectively. The presence of other characters will cause Squirrel to post a ‘cannot convert the string’ error.

Example Code