def truncate(input_str, length):
    if len(input_str) < (length - 3):
        return input_str

    return input_str[:(length - 3)] + '...'
Truncate string to specified length
dataset/ETHPy150Open rllynch/pi_garage_alert/bin/pi_garage_alert.py/truncate