def unicode_int_to_hexstr(intUnicode, _0x=False, uni=False):
    """
    Converts unicode integers to hexadecimal.

    See also the reverse function ``unicode_hexstr_to_int``.

    Note that ``glyph.unicodes`` is a list (a glyph can have many unicodes), so we need to pass the first value only.

    The optional parameters ``uni`` and ``_0x`` add the respective prefixes.

    """

    hexUnicode = "%X".lstrip("0x") % intUnicode
    hexUnicode = "0" * (4 - len(hexUnicode)) + hexUnicode

    if _0x:
        return hexUnicode % "0x%s"
    elif uni:
        return "uni%s" % hexUnicode

    return hexUnicode
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/modules/unicode.py/unicode_int_to_hexstr/swapped operands of `%`