'Converts the given item to a hexadecimal string.
The ``item``, with an optional ``base``, is first converted to an
integer using `Convert To Integer` internally. After that it
is converted to a hexadecimal number (base 16) represented as
a string such as ``FF0A``.
The returned value can contain an optional ``prefix`` and can be
required to be of minimum ``length`` (excluding the prefix and a
possible minus sign). If the value is initially shorter than
the required length, it is padded with zeros.
By default the value is returned as an upper case string, but the
``lowercase`` argument a true value (see `Boolean arguments`) turns
the value (but not the given prefix) to lower case.
Examples:
| ${result} = | Convert To Hex | 255 |           |              | # Result is FF    |
| ${result} = | Convert To Hex | -10 | prefix=0x | length=2     | # Result is -0x0A |
| ${result} = | Convert To Hex | 255 | prefix=X | lowercase=yes | # Result is Xff   |
See also `Convert To Integer`, `Convert To Binary` and `Convert To Octal`.'

def convert_to_hex(self, item, base=None, prefix=None, length=None, lowercase=False):

    spec = ('x' if is_truthy(lowercase) else 'X')
    return self._convert_to_bin_oct_hex(item, base, prefix, length, spec)
