Documentation

util.strings.to_decimal

Convert a string to a decimal.

Arguments:

def util.strings.to_decimal(
  s: str = None,
):

If able to convert s, it returns a decimal based on the string. Otherwise it raises an exception.

Example:

util.strings.to_decimal(s='1.2') # 1.2