gem5  v22.1.0.0
Namespaces | Functions
str.hh File Reference
#include <cstring>
#include <limits>
#include <locale>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <vector>
#include "base/logging.hh"

Go to the source code of this file.

Namespaces

 gem5
 Reference material can be found at the JEDEC website: UFS standard http://www.jedec.org/standards-documents/results/jesd220 UFS HCI specification http://www.jedec.org/standards-documents/results/jesd223.
 

Functions

void gem5::eat_lead_white (std::string &s)
 
void gem5::eat_end_white (std::string &s)
 
void gem5::eat_white (std::string &s)
 
std::string gem5::to_lower (const std::string &s)
 
bool gem5::split_first (const std::string &s, std::string &lhs, std::string &rhs, char c)
 
bool gem5::split_last (const std::string &s, std::string &lhs, std::string &rhs, char c)
 
void gem5::tokenize (std::vector< std::string > &v, const std::string &s, char token, bool ignore)
 
template<class T >
std::enable_if_t<(std::is_integral_v< T >||std::is_floating_point_v< T >||std::is_enum_v< T >) &&!std::is_same_v< bool, T >, bool > gem5::to_number (const std::string &value, T &retval)
 Turn a string representation of a number, either integral, floating point, or enum into an actual number. More...
 
bool gem5::to_bool (const std::string &value, bool &retval)
 Turn a string representation of a boolean into a boolean value. More...
 
std::string gem5::quote (const std::string &s)
 
bool gem5::startswith (const char *s, const char *prefix)
 Return true if 's' starts with the prefix string 'prefix'. More...
 
bool gem5::startswith (const std::string &s, const char *prefix)
 Return true if 's' starts with the prefix string 'prefix'. More...
 
bool gem5::startswith (const std::string &s, const std::string &prefix)
 Return true if 's' starts with the prefix string 'prefix'. More...
 
String to number helper functions for signed and unsigned

integeral type, as well as enums and floating-point types.

template<class T >
std::enable_if_t< std::is_integral_v< T >, T > gem5::__to_number (const std::string &value)
 
template<class T >
std::enable_if_t< std::is_enum_v< T >, T > gem5::__to_number (const std::string &value)
 
template<class T >
std::enable_if_t< std::is_floating_point_v< T >, T > gem5::__to_number (const std::string &value)
 

Generated on Wed Dec 21 2022 10:22:54 for gem5 by doxygen 1.9.1