def has_role(self, role):
        return self.roles and any([re.search(role, our_role, re.I)
                                   for our_role in self.roles])
Truncates a string after a certain number of characters, but respects word boundaries.
dataset/ETHPy150Open tophatmonocle/ims_lti_py/ims_lti_py/tool_provider.py/ToolProvider.has_role--crossover with--dataset/ETHPy150Open jumoconnect/openjumo/jumodjango/etc/templatetags/tags.py/truncatechars