Changeset 1375 for trunk/src/STFrequencies.cpp
- Timestamp:
- 07/12/07 11:57:05 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STFrequencies.cpp
r1360 r1375 274 274 } 275 275 276 std::string STFrequencies::print( int id )276 std::string STFrequencies::print( int id, Bool strip ) const 277 277 { 278 278 Table t; … … 284 284 const TableRecord& rec = row.get(i); 285 285 oss << setw(8) 286 << t.keywordSet().asString("FRAME") << setw(16) << setprecision(8) 287 << rec.asDouble("REFVAL") << setw(7) 288 << rec.asDouble("REFPIX") << setw(12) 289 << rec.asDouble("INCREMENT") << endl; 290 } 291 return String(oss); 286 << t.keywordSet().asString("FRAME") << setw(16) << setprecision(8) 287 << rec.asDouble("REFVAL") << setw(7) 288 << rec.asDouble("REFPIX") 289 << setw(12) 290 << rec.asDouble("INCREMENT"); 291 } 292 String outstr(oss); 293 if (strip) { 294 int f = outstr.find_first_not_of(' '); 295 int l = outstr.find_last_not_of(' ', outstr.size()); 296 if (f < 0) { 297 f = 0; 298 } 299 if ( l < f || l < f ) { 300 l = outstr.size(); 301 } 302 return outstr.substr(f,l); 303 } 304 return outstr; 292 305 } 293 306
Note: See TracChangeset
for help on using the changeset viewer.