{@inheritDoc}
@see \common_persistence_AdvKvDriver::hExists()
320503
public function hExists($key, $field)
    {
        $this->log(__FUNCTION__, $key);
        return $this->persistence->hExists($key, $field);
    }
399159
public static function HexToAscii($hex)
   {
      $ascii = '';
   
      if (strlen($hex) % 2 == 1)
         $hex = '0'.$hex;
   
      for($i = 0; $i < strlen($hex); $i += 2)
         $ascii .= chr(base_convert(substr($hex, $i, 2), 16, 10));
   
      return $ascii;
   }
63475
static function FromArgbHex($hex)
    {
        $cleanHex = ltrim($hex, '#');
        $a = hexdec(substr($cleanHex, 0, 2));
        $r = hexdec(substr($cleanHex, 2, 2));
        $g = hexdec(substr($cleanHex, 4, 2));
        $b = hexdec(substr($cleanHex, 6, 2));
        return new self($a, $r, $g, $b);
    }
302526
public static function hexToRgb($hex) {
    if (!self::validateHex($hex)) {
      throw new \InvalidArgumentException("'$hex' is not a valid hex value.");
    }

    // Ignore '#' prefixes.
    $hex = ltrim($hex, '#');

    // Convert shorthands like '#abc' to '#aabbcc'.
    if (strlen($hex) == 3) {
      $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
    }

    $c = hexdec($hex);

    return array(
      'red' => $c >> 16 & 0xFF,
      'green' => $c >> 8 & 0xFF,
      'blue' => $c & 0xFF,
    );
  }
1015958
public function hexists($collection, $key, $field) {

        $set = $this->getKey($collection, $key, []);

        return isset($set[$field]);
    }
1211358
private static function createHexArray(array $vals)
    {
        foreach ($vals as $r) {
            foreach ($vals as $g) {
                foreach ($vals as $b) {
                    $colors[] = self::rgbToHex($r, $g, $b);
                }
            }
        }
        
        return $colors;
    }
257308
private function _argindex($n, $a)
    {
        $dashdash = 0;
        if (!is_array($a) || !count($a)) {
            return -1;
        }
        for ($i=1; $i < count($a); $i++) {
            if ($dashdash || !($a[$i][0] == '-' || $a[$i][0] == '+' || strchr($a[$i], '='))) {
                if ($n == 0) {
                    return $i;
                }
                $n--;
            }
            if ($_SERVER['argv'][$i] == '--') {
                $dashdash = 1;
            }
        }
        return -1;
    }
210999
function sanitizeObjectForHexProps (stateObject) {
      Tweenable.each(stateObject, function (prop) {
        var currentProp = stateObject[prop];

        if (typeof currentProp === 'string' && currentProp.match(R_HEX)) {
          stateObject[prop] = sanitizeHexChunksToRGB(currentProp);
        }
      });
    }
72200
public function hexToRgb( $hex ) {
        $hex = ltrim($hex, '#'); // Remove #

        if(strlen($hex) == 3) {
            $r = hexdec(substr($hex,0,1).substr($hex,0,1));
            $g = hexdec(substr($hex,1,1).substr($hex,1,1));
            $b = hexdec(substr($hex,2,1).substr($hex,2,1));
        } else {
            $r = hexdec(substr($hex,0,2));
            $g = hexdec(substr($hex,2,2));
            $b = hexdec(substr($hex,4,2));
        }
        return array($r, $g, $b); // Returns an array with the rgb values
    }
919051
public function hexToStr($hex)
    {
        $str = '';
        $hl = strlen($hex);
        for ($i = 0; $i < $hl; $i += 2) {
            $str .= chr(intval(substr($hex, $i, 2), 16));
        }
        return $str;
    }
757641
function hex2dec($hex)
		# Purpose:  Convert #hex color to RGB
	{
		$color = str_replace('#', '', $hex);

		if (strlen($color) == 3)
		{
			$color = $color . $color;
		}

		$rgb = array(
			'r' => hexdec(substr($color, 0, 2)),
			'g' => hexdec(substr($color, 2, 2)),
			'b' => hexdec(substr($color, 4, 2)),
			'a' => 0
		);

		return $rgb;
	}
498446
public static function hexToBin($data)
    {
        if (self::ourStrlen($data) % 2 !== 0) {
            \trigger_error("hex2bin(): Hexadecimal input string must have an even length", E_USER_WARNING);
            return false;
        }
        return \pack('H*', $data);
    }
926798
public static function hex2rgb($hex)
    {
        $hex = str_replace("#", "", $hex);
        $r = hexdec(substr($hex,0,2));
        $g = hexdec(substr($hex,2,2));
        $b = hexdec(substr($hex,4,2));
        return "$r,$g,$b";
    }
871277
public static function fromHex(string $hex): Uuid
    {
        $clean = strtolower($hex);

        if (!preg_match(static::UUID_HEX, $clean, $matches)) {
            $message = sprintf('Invalid UUID hex: %s', $hex);
            throw new DomainException($message);
        }

        $timeLow = $matches[1];
        $timeMid = $matches[2];
        $timeHiAndVersion = $matches[3];
        $clockSeqHiAndReserved = $matches[4];
        $clockSeqLow = $matches[5];
        $node = $matches[6];

        return new static($timeLow, $timeMid, $timeHiAndVersion, $clockSeqHiAndReserved, $clockSeqLow, $node);
    }
880649
public function hExists($key, $field) {
        return $this->getHandler($this->judge(__FUNCTION__))->hExists($key, $field);
    }
256726
public static function convert_uids($st){
    if ( \is_array($st) || \is_object($st) ){
      foreach ( $st as &$s ){
        $s = self::convert_uids($s);
      }
    }
    else if ( \bbn\str::is_uid($st) ){
      $st = bin2hex($st);
    }
    return $st;
  }
1090981
public function toHEX()
    {
        list($red, $green, $blue) = $this->toRGB();

        return strtoupper(sprintf('#%02x%02x%02x', $red, $green, $blue));
    }