101 std::string splitString = splitter.
getString();
102 std::vector<std::string> result = this->
split(splitString);
109 std::vector<std::string> result;
111 if (!
theString_.empty() && !splitter.empty()) {
113 for (std::string::size_type offset = 0;;) {
115 std::string::size_type found =
theString_.find(splitter, offset);
117 if (found != std::string::npos) {
118 std::string tmpString =
theString_.substr(offset, found-offset);
119 if (tmpString.size() > 0) {result.push_back(tmpString);}
120 offset = found + splitter.size();
123 if (tmpString.size() > 0) {result.push_back(tmpString);}
File containing declaration of LauString class.
Class for defining a string.
std::vector< std::string > split(const std::string &splitter) const
Split up a string according to a split string (e.g. ":" or " ")
LauString operator+=(int integer)
Add an integer to the string.
void addText(const char *text)
Add some text from a character array.
LauString & operator=(const LauString &s)
Copy assignment operator.
std::string theString_
The string.
void addInteger(int integer)
Add an integer value to the string.
std::string getString() const
Retrieve the string as an STL string.
void addDouble(double value)
Add a double value to the string.
Double_t value() const
The value of the parameter.
virtual ~LauString()
Destructor.
LauString()
Constructor for an empty string.