Icon StrToIntDef

Unit: Internal

Available In: Client and Server Applications

function StrToIntDef(const Value: String;
                     DefaultValue: Integer=0): Integer

The StrToIntDef function converts the formatted string input parameter into its native value. If the input parameter is not a valid integer string, the return value is the specified default value.

Examples

X := StrToIntDef('-102', 0);  // X is -102
Image