ezeio2:scriptref:fstrval

Evaluate a string to a float value

Description

Float:fstrval( const str[], index=0, limit=15 )

Evaluate the string, starting at the index position for a float value Max limit characters will be evaluated, starting at the index position.

Parameters

str source string
index start position in str

Return value

Returns the value as a float

Example usage

    new s{20};
    new Float:x;
 
    strcopy(s, "Hello3.14"); 
 
    x = fstrval(s, 5);
 
    // x now equals 3.14

NOTE: requires firmware 24020101 or newer.

  • ezeio2/scriptref/fstrval.txt
  • Last modified: 2024-02-05 23:17
  • by andreh