Lines Matching refs:prefix
23 std::string prefix;
28 : prefix(pre), wildcard_child(nullptr) {}
32 Node* CreateChild(std::string prefix) {
33 char label = prefix[0];
37 children[label] = new Node(prefix);
41 // swap prefix
43 unsigned int prefix_len = prefix.length();
44 for (; i < child->prefix.length(); ++i) {
45 if (i > prefix_len || prefix[i] != child->prefix[i]) {
46 std::string parent_prefix = child->prefix.substr(0, i);
47 std::string child_prefix = child->prefix.substr(i);
49 child->prefix = child_prefix;
54 return split_child->CreateChild(prefix.substr(i));
57 return child->CreateChild(prefix.substr(i));
78 // match prefix
79 unsigned int prefix_len = child->prefix.length();
81 if (i >= prefix_len || child->prefix[i] == '*') {
89 child->prefix[i] == node::kPathSeparator) {
93 if (path[idx++] != child->prefix[i]) {