Yamool.CWSharp.Dawg.Contains C# (CSharp) Method

Contains() public method

public Contains ( string word ) : bool
word string
return bool
        public bool Contains(string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return false;
            }

            var nextNode = _root.Next(word[0]);
            for (var i = 1; nextNode != null && i < word.Length; i++)
            {
                nextNode = nextNode.Next(word[i]);
            }
            return nextNode != null && nextNode.Eow;
        }