openMSX
Classes | Namespaces | Functions
StringOp.hh File Reference
#include "likely.hh"
#include "stringsp.hh"
#include <algorithm>
#include <charconv>
#include <cstdint>
#include <iomanip>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for StringOp.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  StringOp::caseless
 
struct  StringOp::casecmp
 

Namespaces

 StringOp
 

Functions

template<typename T >
std::optional< T > StringOp::stringTo (std::string_view s)
 Convert a string to an integral type 'T' (int, uint64_t, ...). More...
 
template<int BASE, typename T >
std::optional< T > StringOp::stringToBase (std::string_view s)
 As above, but without dynamic base detection. More...
 
bool StringOp::stringToBool (string_view str)
 
bool StringOp::startsWith (string_view total, string_view part)
 
bool StringOp::startsWith (string_view total, char part)
 
bool StringOp::endsWith (string_view total, string_view part)
 
bool StringOp::endsWith (string_view total, char part)
 
void StringOp::trimRight (string &str, const char *chars)
 
void StringOp::trimRight (string &str, char chars)
 
void StringOp::trimRight (string_view &str, string_view chars)
 
void StringOp::trimRight (string_view &str, char chars)
 
void StringOp::trimLeft (string &str, const char *chars)
 
void StringOp::trimLeft (string &str, char chars)
 
void StringOp::trimLeft (string_view &str, string_view chars)
 
void StringOp::trimLeft (string_view &str, char chars)
 
void StringOp::trim (string_view &str, string_view chars)
 
void StringOp::trim (string_view &str, char chars)
 
std::pair< string_view, string_view > StringOp::splitOnFirst (string_view str, string_view chars)
 
std::pair< string_view, string_view > StringOp::splitOnFirst (string_view str, char chars)
 
std::pair< string_view, string_view > StringOp::splitOnLast (string_view str, string_view chars)
 
std::pair< string_view, string_view > StringOp::splitOnLast (string_view str, char chars)
 
vector< unsigned > StringOp::parseRange (string_view str, unsigned min, unsigned max)
 
vector< string_view > StringOp::split (string_view str, char chars)
 
auto StringOp::split_view (std::string_view str, char c)