MCPcopy Create free account
hub / github.com/Kitware/VTK / SimplifyWhitespace

Function SimplifyWhitespace

IO/Geometry/vtkTecplotReader.cxx:405–421  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

403
404//------------------------------------------------------------------------------
405static std::string SimplifyWhitespace(const std::string& s)
406{
407 int headIndx = 0;
408 int tailIndx = int(s.length()) - 1;
409
410 while (headIndx < tailIndx && (s[headIndx] == ' ' || s[headIndx] == '\t'))
411 {
412 headIndx++;
413 }
414
415 while (tailIndx > headIndx && (s[tailIndx] == ' ' || s[tailIndx] == '\t'))
416 {
417 tailIndx--;
418 }
419
420 return s.substr(headIndx, tailIndx - headIndx + 1);
421}
422
423//------------------------------------------------------------------------------
424// Supporting Functions ( end )

Callers 2

GetDataArraysListMethod · 0.85
ReadFileMethod · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected