MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / keyword

Method keyword

src/common/config/dir_list.cpp:124–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124bool DirectoryList::keyword(const ListMode keyMode, PathName& value, PathName key, PathName next)
125{
126 if (value.length() < key.length()) {
127 return false;
128 }
129 PathName keyValue = value.substr(0, key.length());
130 if (keyValue != key) {
131 return false;
132 }
133 if (next.length() > 0)
134 {
135 if (value.length() == key.length()) {
136 return false;
137 }
138 keyValue = value.substr(key.length());
139 if (next.find(keyValue[0]) == PathName::npos) {
140 return false;
141 }
142 PathName::size_type startPos = keyValue.find_first_not_of(next);
143 if (startPos == PathName::npos) {
144 return false;
145 }
146 value = keyValue.substr(startPos);
147 }
148 else
149 {
150 if (value.length() > key.length()) {
151 return false;
152 }
153 value.erase();
154 }
155 mode = keyMode;
156 return true;
157}
158
159void DirectoryList::initialize(bool simple_mode)
160{

Callers

nothing calls this directly

Calls 5

lengthMethod · 0.45
substrMethod · 0.45
findMethod · 0.45
find_first_not_ofMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected