searches for an string in the trie. $isPrefix indicates whether
the method should search for the entire word.

@param string $key
@param bool $isPrefix
@return bool
3379
public function search(string $key, bool $isPrefix = false): bool {
        $length = \strlen($key);
        $node = $this->root;

        for ($i = 0; $i < $length; $i++) {
            $charIndex = $this->getCharIndex($key[$i]);
            if (!$node->hasChild($charIndex)) {
                return false;
            }
            $node = $node->getChildNode($charIndex);
        }
        if ($isPrefix) {
            return null !== $node;
        } else {
            return (null !== $node && $node->isEndOfWordNode());
        }
    }
955785
public function containsKey(string $key): bool
    {
        if (isset($this->orgData[$key])) {
            return ! isset($this->removeAttributes[$key]);
        } else {
            return isset($this->addAttributes[$key]);
        }
    }
543476
public function has(/*# string */ $key)/*# : int */
    {
        // try front-end cache first
        $res = $this->frontHas($key);
        if ($res) {
            return $res;
        }

        // try backend cache
        return $this->backHas($key);
    }
513264
public function key($key)
    {
        if (!$key) {
            return false;
        }

        $prefix = '';
        if ($this->_groupPrefix) {
            $prefix = md5(implode('_', $this->groups()));
        }

        $key = preg_replace('/[\s]+/', '_', strtolower(trim(str_replace([DIRECTORY_SEPARATOR, '/', '.'], '_', (string)$key))));

        return $prefix . $key;
    }
566699
public function hasKey(string $key): bool
    {
        return $key && strpos($key, '@@') === false && file_exists($this->getPathFromKey($key));
    }
1188843
public function has($key)
    {
        return $this->translator->has($this->composeKey($key), $this->locale);
    }
584498
public function _getPrev(&$tokens, $key, $whatToGet)
    {
        $key--;
        if (!is_array($whatToGet)) $whatToGet = array($whatToGet);
        while (!is_array($tokens[$key]) || !in_array($tokens[$key][0], $whatToGet)) {
            $key--;
            if (!isset($tokens[$key])) return FALSE;
        }

        return $tokens[$key][1];
    }
504866
public static function has($key, $lang = null)
    {
        $lang = $lang ?: static::$lang;
        return isset(static::$langs[$lang][$key]);
    }
1239417
public function has($key)
    {
        if (!$this->isEnabled()) {
            return false;
        }

        return (false !== apc_fetch($this->prefix() . $key));
    }
274487
function __isset($key) {
        if (!is_string($key)) {
            throw new \Calf\Exception\InvalidArgument('Key must be string.');
        }

        return isset($this->_keys[$key]);
    }
1339046
public function hasQuery($key)
    {
        $arrayKeys = array_keys($_GET);
        $keys = is_array($key) ? $key : func_get_args();

        foreach ($keys as $value) {
            if (!in_array($value, $arrayKeys) || trim((string)$_GET[$value]) === '') {
                return false;
            }
        }

        return true;
    }
475304
static function hasKey(string $key): bool
    {
        self::ensureKeyMapLoaded();

        return isset(self::$keyMap[static::class][$key]);
    }
852379
public function has(string $key): bool
    {
        $slug = $this->splitKey($key);

        if (is_string($slug)) {
            return isset($this[$slug]);
        }

        $collection = $this->all();

        foreach ($this->splitKey($key) as $search) {
            if (!isset($collection[$search])) {
                return false;
            }

            $collection = $collection[$search];
        }

        return true;
    }
411250
private static boolean propMatchesPrefix(String prefix, String key) {
        return key.startsWith(prefix) && key.length() >= prefix.length();
    }
1280241
private function setPrefixKey()
    {
        if (null !== $this->getContext()) {
            $this->_prefix_key = md5($this->getContext());
        }

        return $this;
    }
860230
public function has($key)
    {
        if (is_null($key)) {
            return $this->any();
        }

        $keys = is_array($key) ? $key : func_get_args();

        foreach ($keys as $key) {
            if ($this->first($key) === '') {
                return false;
            }
        }

        return true;
    }
1053072
public function has($string)
    {
        $lowercase = strtolower($string);

        if (!parent::has($lowercase) && !JFactory::getLanguage()->hasKey($string))
        {
            if (isset($this->_aliases[$lowercase])) {
                $key = $this->_aliases[$lowercase];
            }
            elseif (substr($string, 0, strlen($this->getPrefix())) === $this->getPrefix()) {
                $key = $string;
            } else {
                //Gets a key from the catalogue and prefixes it
                $key = $this->getPrefix().$this->generateKey($string);
            }

            $result = JFactory::getLanguage()->hasKey($key);
        }
        else $result = true;

        return $result;
    }