func (trie *PathTrie) newPathTrie() *PathTrie {
	return &PathTrie{
		segmenter: trie.segmenter,
	}
}
newPathTrieFromTrie returns new trie while preserving its config
package trie
type PathTrie struct {
	segmenter StringSegmenter  
	value     interface{}
	children  map[string]*PathTrie
}
type PathTrieConfig struct {
	Segmenter StringSegmenter
}
func NewPathTrie() *PathTrie {
	return &PathTrie{
		segmenter: PathSegmenter,
	}
}
func NewPathTrieWithConfig(config *PathTrieConfig) *PathTrie {
	segmenter := PathSegmenter
	if config != nil && config.Segmenter != nil {
		segmenter = config.Segmenter
	}
	return &PathTrie{
		segmenter: segmenter,
	}
}