def truncate(text, length=50, ellipsis='...'):
    """
    Returns a truncated version of the inputted text.

    :param      text | <str>
                length | <int>
                ellipsis | <str>

    :return     <str>
    """
    text = nativestring(text)
    return text[:length] + (text[length:] and ellipsis)