PndStringSeparator¶
-
class PndStringSeparator¶
Separates a string into substrings at arbitrary delimiters.
Separation into sub-strings¶
Separates an input string into substrings and stores them in a string vector. The separation criteria is a string of characters. If no delimiters are given the default delimiter ” ” is used.
## Example
std::vector<std::string> fOutput; PndStringSeparator fInput("Column:Row Type: Test ", ": "); fOutput = fInput.GetStringVector(); fOutput[0] = "Column" fOutput[1] = "Row" fOutput[2] = "Type" fOutput[3] = "Test"
- Author
Tobias Stockmanns t.stockmanns@fz-juelich.de
Public Functions
-
inline PndStringSeparator()¶
-
inline ~PndStringSeparator()¶
-
explicit PndStringSeparator(std::string AInput, std::string ADelimiter = " ")¶
-
inline void SetInput(std::string AInput)¶
-
inline void SetDelimiter(std::string ADelimiter)¶
-
inline void ResetVector()¶
-
std::vector<std::string> GetStringVector(void)¶
-
std::string Replace(std::string from, std::string to)¶
-
void Print()¶