def truncatechars(value, arg):
    """
    Truncates a string after a certain number of characters, but respects word boundaries.

    Argument: Number of characters to truncate after.
    """
    try:
        length = int(arg)
    except __HOLE__: # If the argument is not a valid integer.
        return value # Fail silently.
    return truncate_chars(value, length)
dataset/ETHPy150Open jumoconnect/openjumo/jumodjango/etc/templatetags/tags.py/truncatechars