ATLAS Offline Software
Control/CxxUtils/CxxUtils/StringUtils.h
Go to the documentation of this file.
1 
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 #ifndef CXXUTILS_STRINGUTILS_H
7 #define CXXUTILS_STRINGUTILS_H
8 
9 #include <string>
10 #include <string_view>
11 #include <vector>
12 #include <iostream>
13 
14 
15 namespace CxxUtils {
19 
21  int atoi(std::string_view str);
23  double atof(std::string_view str);
25  std::string_view eraseWhiteSpaces(std::string_view str);
26 
28  std::vector<std::string> tokenize(const std::string& the_str,
29  std::string_view delimiters);
30 
31  std::vector<double> tokenizeDouble(const std::string& the_str,
32  std::string_view delimiter);
33 
34  std::vector<int> tokenizeInt(const std::string& the_str,
35  std::string_view delimiter);
36 
37 
38 }
39 #endif
CxxUtils::tokenizeDouble
std::vector< double > tokenizeDouble(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:34
CxxUtils::eraseWhiteSpaces
std::string_view eraseWhiteSpaces(std::string_view str)
Removes all trailing and starting whitespaces from a string.
Definition: Control/CxxUtils/Root/StringUtils.cxx:44
CxxUtils::tokenizeInt
std::vector< int > tokenizeInt(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:55
CxxUtils::tokenize
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition: Control/CxxUtils/Root/StringUtils.cxx:15
python.AthDsoLogger.delimiter
delimiter
Definition: AthDsoLogger.py:71
CxxUtils
Definition: aligned_vector.h:29
CxxUtils::atof
double atof(std::string_view str)
Converts a string into a double / float.
Definition: Control/CxxUtils/Root/StringUtils.cxx:91
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
str
Definition: BTagTrackIpAccessor.cxx:11