ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
CxxUtils
CxxUtils
Control/CxxUtils/CxxUtils/StringUtils.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef CXXUTILS_STRINGUTILS_H
5
#define CXXUTILS_STRINGUTILS_H
6
7
#include <string>
8
#include <string_view>
9
#include <vector>
10
#include <charconv>
11
12
namespace
CxxUtils
{
16
18
int
atoi
(std::string_view str);
20
double
atof
(std::string_view str);
22
std::string_view
trimWhiteSpaces
(std::string_view str)
noexcept
;
23
25
std::vector<std::string>
tokenize
(std::string_view the_str,
26
std::string_view delimiters);
27
std::vector<std::string>
tokenize
(std::string_view the_str,
28
char
delimiter
);
29
30
std::vector<double>
tokenizeDouble
(std::string_view the_str,
31
std::string_view
delimiter
);
32
33
std::vector<int>
tokenizeInt
(std::string_view str,
34
std::string_view
delimiter
);
35
36
}
37
#endif
delimiter
static const std::string delimiter("/")
CxxUtils
Definition
aligned_vector.h:29
CxxUtils::tokenizeDouble
std::vector< double > tokenizeDouble(std::string_view the_str, std::string_view delimiter)
Definition
Control/CxxUtils/Root/StringUtils.cxx:23
CxxUtils::trimWhiteSpaces
std::string_view trimWhiteSpaces(std::string_view str) noexcept
Removes all trailing and starting whitespaces from a string.
Definition
Control/CxxUtils/Root/StringUtils.cxx:27
CxxUtils::tokenizeInt
std::vector< int > tokenizeInt(std::string_view str, std::string_view delimiter)
Definition
Control/CxxUtils/Root/StringUtils.cxx:36
CxxUtils::atof
double atof(std::string_view str)
Converts a string into a double / float.
Definition
Control/CxxUtils/Root/StringUtils.cxx:46
CxxUtils::tokenize
std::vector< std::string > tokenize(std::string_view the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition
Control/CxxUtils/Root/StringUtils.cxx:12
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:40
Generated on
for ATLAS Offline Software by
1.17.0