/// <summary> /// Constructs a CharsTrie reader instance. /// </summary> /// <remarks> /// The <see cref="ICharSequence"/> must contain a copy of a char sequence from the <see cref="CharsTrieBuilder"/>, /// with the offset indicating the first char of that sequence. /// The <see cref="CharsTrie"/> object will not read more chars than /// the <see cref="CharsTrieBuilder"/> generated in the corresponding /// <see cref="CharsTrieBuilder.Build(StringTrieBuilder.Option)"/> call. /// <para/> /// The <see cref="ICharSequence"/> is not copied/cloned and must not be modified while /// the <see cref="CharsTrie"/> object is in use. /// </remarks> /// <param name="trieChars"><see cref="ICharSequence"/> that contains the serialized trie.</param> /// <param name="offset">Root offset of the trie in the <see cref="ICharSequence"/>.</param> /// <stable>ICU 4.8</stable> internal CharsTrie(ICharSequence trieChars, int offset) { chars_ = trieChars.ToCharSequence(); pos_ = root_ = offset; remainingMatchLength_ = -1; }