Lines Matching +full:- +full:- +full:prefix
23 std::string prefix; member
28 : prefix(pre), wildcard_child(nullptr) {} in Node()
32 Node* CreateChild(std::string prefix) { in CreateChild()
33 char label = prefix[0]; in CreateChild()
37 children[label] = new Node(prefix); in CreateChild()
41 // swap prefix in CreateChild()
43 unsigned int prefix_len = prefix.length(); in CreateChild()
44 for (; i < child->prefix.length(); ++i) { in CreateChild()
45 if (i > prefix_len || prefix[i] != child->prefix[i]) { in CreateChild()
46 std::string parent_prefix = child->prefix.substr(0, i); in CreateChild()
47 std::string child_prefix = child->prefix.substr(i); in CreateChild()
49 child->prefix = child_prefix; in CreateChild()
51 split_child->children[child_prefix[0]] = child; in CreateChild()
54 return split_child->CreateChild(prefix.substr(i)); in CreateChild()
57 return child->CreateChild(prefix.substr(i)); in CreateChild()
77 auto child = it->second; in NextNode()
78 // match prefix in NextNode()
79 unsigned int prefix_len = child->prefix.length(); in NextNode()
81 if (i >= prefix_len || child->prefix[i] == '*') { in NextNode()
89 child->prefix[i] == node::kPathSeparator) { in NextNode()
93 if (path[idx++] != child->prefix[i]) { in NextNode()
103 // ---> er
104 // ---> n
108 // ---> '\000' ASCII (0) || \0
109 // ---> er
110 // ---> n