def floatToStr(number: float, showNumOfDigits: int = 2) -> str:
    """ Convert float number with any number of decimal digits and return string 
    with ``showNumbOfDigits`` places after ``.``.

    Args:
        number: float number to convert to string.
        showNumOfDigits: number of decimal places (characters) that are 
            added/stripped after ``.``.
    """
    number = round(number, showNumOfDigits)
    if showNumOfDigits == 0:
        numberStr = str(int(number))
    else:
        numberStr = "{:.{}f}".format(number, showNumOfDigits)

    return numberStr