Changeset 11004 for trunk/gsdl/src/recpt
- Timestamp:
- 2005-12-19T11:03:52+13:00 (18 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/querytools.cpp
r10995 r11004 262 262 } 263 263 264 void get_phrases (const text_t &querystring, text_tarray &phrases) {265 266 phrases.erase (phrases.begin(), phrases.end());267 if (!querystring.empty()) {268 269 text_t::const_iterator end = querystring.end();270 text_t::const_iterator here = findchar (querystring.begin(), end, '"');271 if (here != end) {272 text_t tmptext;273 bool foundquote = false;274 while (here != end) {275 if (*here == '"') {276 if (foundquote) {277 if (!tmptext.empty()) {278 phrases.push_back(tmptext);279 tmptext.clear();280 }281 foundquote = false;282 } else foundquote = true;283 } else {284 if (foundquote) tmptext.push_back (*here);285 }286 ++here;287 }288 }289 }290 }291 292 264 // search history tool 293 265 // also used for form query macros -
trunk/gsdl/src/recpt/querytools.h
r8357 r11004 45 45 int startbc, int endbc, int ct); 46 46 47 void get_phrases (const text_t &querystring, text_tarray &phrases);48 49 47 void add_ands(text_t& querystring, int querytype); 50 48
Note:
See TracChangeset
for help on using the changeset viewer.