Cut unicode string from right to fit a given width.

def unicode_right(s, width):
    """Cut unicode string from right to fit a given width."""
    i = len(s)
    j = 0
    for ch in reversed(s):
        j += __unicode_width_mapping[east_asian_width(ch)]
        if width < j:
            break
        i -= 1
    return s[i:]