mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add Foam::SubStrings container and stringOps::split
- generic means of holding ranges of substring iterators
This commit is contained in:
@ -30,12 +30,14 @@ Description
|
||||
|
||||
SourceFiles
|
||||
stringOps.C
|
||||
stringOpsTemplates.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#ifndef stringOps_H
|
||||
#define stringOps_H
|
||||
|
||||
#include "string.H"
|
||||
#include "SubStrings.H"
|
||||
#include "word.H"
|
||||
#include "dictionary.H"
|
||||
#include "HashTable.H"
|
||||
@ -302,14 +304,21 @@ namespace stringOps
|
||||
Foam::word name(const std::string& fmt, const PrimitiveType& val);
|
||||
|
||||
|
||||
} // End namespace stringOps
|
||||
//- Split a string into sub-strings at the delimiter character.
|
||||
// An empty sub-strings are suppressed.
|
||||
template<class StringType>
|
||||
Foam::SubStrings<StringType> split
|
||||
(
|
||||
const StringType& str,
|
||||
const char delimiter
|
||||
);
|
||||
|
||||
} // End namespace stringOps
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
|
||||
Reference in New Issue
Block a user