def truncate_letters(s, num):
    s = force_unicode(s)
    length = int(num)
    if len(s) > length:
        s = s[:length]
        if not s.endswith('...'):
            s += '...'
    return s
Return a :class:`~prompt_toolkit.layout.dimension.LayoutDimension` that
dataset/ETHPy150Open mozilla/inventory/vendor-local/src/django-extensions/build/lib/django_extensions/utils/text.py/truncate_letters--crossover with--dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/layout/containers.py/Container.preferred_width