Changeset 348 for cpp/frams/util/sstring.cpp
- Timestamp:
- 04/09/15 23:51:28 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstring.cpp
r347 r348 251 251 void SString::operator+=(const SString&s) 252 252 { 253 append( (const char*)s,s.len());253 append(s.c_str(),s.len()); 254 254 } 255 255 … … 323 323 int SString::indexOf(const SString & substring,int start) const 324 324 { 325 char *found=strstr(buf->txt+start, ((const char*)substring));325 char *found=strstr(buf->txt+start,substring.c_str()); 326 326 return found?found-buf->txt:-1; 327 327 } … … 341 341 int SString::startsWith(const char *pattern) const 342 342 { 343 const char *t= (const char*)(*this);343 const char *t=this->c_str(); 344 344 for (;*pattern;pattern++,t++) 345 345 if (*t != *pattern) return 0; … … 358 358 { 359 359 SString tmp=SString::sprintf("%.15g",d); 360 if ((!strchr(tmp ,'.'))&&(!strchr(tmp,'e'))) tmp+=".0";360 if ((!strchr(tmp.c_str(),'.'))&&(!strchr(tmp.c_str(),'e'))) tmp+=".0"; 361 361 return tmp; 362 362 }
Note: See TracChangeset
for help on using the changeset viewer.