Changeset 395 for cpp/frams/util/sstring.cpp
- Timestamp:
- 06/23/15 00:50:52 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstring.cpp
r367 r395 333 333 } 334 334 335 intSString::getNextToken (int& pos,SString &token,char separator) const336 { 337 if (pos>=len()) {token=0;return 0;}335 bool SString::getNextToken (int& pos,SString &token,char separator) const 336 { 337 if (pos>=len()) {token=0;return false;} 338 338 int p1=pos,p2; 339 339 const char *t1=buf->txt+pos; … … 342 342 strncpy(token.directWrite(p2-p1),t1,p2-p1); 343 343 token.endWrite(p2-p1); 344 return 1;345 } 346 347 intSString::startsWith(const char *pattern) const344 return true; 345 } 346 347 bool SString::startsWith(const char *pattern) const 348 348 { 349 349 const char *t=this->c_str(); 350 350 for (;*pattern;pattern++,t++) 351 if (*t != *pattern) return 0;352 return 1;351 if (*t != *pattern) return false; 352 return true; 353 353 } 354 354
Note: See TracChangeset
for help on using the changeset viewer.