gem5 v24.0.0.0
|
#include <algorithm>
#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 | |
namespace | gem5 |
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved. | |
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. | |
bool | gem5::to_bool (const std::string &value, bool &retval) |
Turn a string representation of a boolean into a boolean value. | |
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'. | |
bool | gem5::startswith (const std::string &s, const char *prefix) |
Return true if 's' starts with the prefix string 'prefix'. | |
bool | gem5::startswith (const std::string &s, const std::string &prefix) |
Return true if 's' starts with the prefix string 'prefix'. | |
std::string | gem5::replace (const std::string &s, char from, char to) |
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) |