Esempio n. 1
0
        public override BaseTrieNode Seek(char character)
        {
            if (char.IsUpper(character))
            {
                character = char.ToLowerInvariant(character);
            }

            var result = CharacterNodes.TryGetValue(character, out var value);

            return(result ? (BaseTrieNode)value : this);
        }
Esempio n. 2
0
        public override BaseTrieNode Seek(char character)
        {
            if (char.IsUpper(character))
            {
                character = char.ToLowerInvariant(character);
            }

            var result = CharacterNodes.TryGetValue(character, out var value);

            var node = result ? value : FailNode.Seek(character);

            return(node);
        }