MCPcopy Create free account
hub / github.com/amule-project/amule / GetNextField

Function GetNextField

src/libs/common/StringFunctions.cpp:165–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163};
164
165inline wxString GetNextField(const wxString& str, size_t& cookie)
166{
167 // These are taken to separate "fields"
168 static const wxChar* s_delims = L"\t\n\x0b\x0c\r !\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~";
169
170 wxString field;
171 ECharType curType = ECTNone;
172 for (; cookie < str.Length(); ++cookie) {
173 wxChar c = str[cookie];
174
175 if ((c >= '0') && (c <= '9')) {
176 if (curType == ECTText) {
177 break;
178 }
179
180 curType = ECTInteger;
181 field += c;
182 } else if (wxStrchr(s_delims, c)) {
183 if (curType == ECTNone) {
184 continue;
185 } else {
186 break;
187 }
188 } else {
189 if (curType == ECTInteger) {
190 break;
191 }
192
193 curType = ECTText;
194 field += c;
195 }
196 }
197
198 return field;
199}
200
201
202int FuzzyStrCmp(const wxString& a, const wxString& b)

Callers 1

FuzzyStrCmpFunction · 0.85

Calls 1

LengthMethod · 0.80

Tested by

no test coverage detected