function

CF

function stringToDecimal

The function/method stringToDecimal accepts an argument str representing a string value. The string str contains…