openfoam/applications
Mark Olesen 883196981d ENH: add offset support to stringOps::split functions
- for example,

     string buffer = ...;
     SubStrings<string> split;
     {
         auto colon = buffer.find(':');

         if (colon != std::string::npos)
         {
             split = stringOps::splitSpace(buffer, colon+1);
         }
     }

    Not really possible with a substr() since that would create a new
    temporary which then disappears.  Similarly awkward to split and
    then scan for the ':' to decide how many to discard.

ENH: add pop_front() and pop_back() methods to SubStrings

- the content is trivial enough (a pair of iterators) and the total
  number of elements is usually reasonable short so that removal of
  elements is inexpensive

  For example,

     string buffer = ...;
     auto split = stringOps::splitSpace(buffer);

     if (!split.empty() && split[0].str() == "face")
     {
         split.pop_front();
     }
2024-05-02 17:53:53 +02:00
..
solvers ENH: fvMatrix, faMatrix: replace raw pointers with unique_ptr (#3107) 2024-03-05 18:13:59 +00:00
test ENH: add offset support to stringOps::split functions 2024-05-02 17:53:53 +02:00
tools ENH: support field width for #eval expressions 2021-03-29 16:00:11 +02:00
utilities STYLE: use PstreamBuffers default construct 2024-04-29 10:21:25 +02:00
Allwmake COMP: increment lemon sources, fix stray comment char (wmkdepend) 2022-05-11 09:53:58 +02:00