ATLAS Offline Software
Loading...
Searching...
No Matches
Analysis::CalibrationDataInterface Namespace Reference

Functions

std::vector< std::string > split (const std::string &str, const char token=';')
 local utility function: split string into a vector of substrings separated by a specified separator, and with whitespace in the results trimmed

Function Documentation

◆ split()

std::vector< std::string > Analysis::CalibrationDataInterface::split ( const std::string & str,
const char token = ';' )

local utility function: split string into a vector of substrings separated by a specified separator, and with whitespace in the results trimmed

Definition at line 9 of file CalibrationDataInternals.cxx.

9 {
10 std::vector<std::string> result = CxxUtils::tokenize(str, token);
11 for (std::string& element : result) {
12 element = CxxUtils::trimWhiteSpaces(element);
13 }
14 return result;
15 }
std::string_view trimWhiteSpaces(std::string_view str) noexcept
Removes all trailing and starting whitespaces from a string.
std::vector< std::string > tokenize(std::string_view the_str, std::string_view delimiters)
Splits the string into smaller substrings.