def cut_string(s, length=100):
    """Truncates a string for a given length.

       :param s: string to truncate
       :param length: amount of characters to truncate to
       :return: string containing given length of characters
       """
    if 0 <= length < len(s):
        return "%s..." % s[:length]

    return s