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.