openMSX
Classes | Namespaces | Enumerations | Functions
StringOp.hh File Reference
#include "IterableBitSet.hh"
#include "stringsp.hh"
#include <algorithm>
#include <charconv>
#include <concepts>
#include <cstdint>
#include <iomanip>
#include <limits>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
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::inv_caseless
 
struct  StringOp::casecmp
 

Namespaces

namespace  StringOp
 

Enumerations

enum class  StringOp::EmptyParts { StringOp::KEEP , StringOp::REMOVE }
 

Functions

template<std::integral T>
std::optional< T > StringOp::stringTo (std::string_view s)
 Convert a string to an integral type 'T' (int, uint64_t, ...).
 
template<int BASE, std::integral T>
std::optional< T > StringOp::stringToBase (std::string_view s)
 As above, but without dynamic base detection.
 
bool StringOp::stringToBool (string_view str)
 
std::string StringOp::toLower (std::string_view str)
 
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)
 
IterableBitSet< 64 > StringOp::parseRange (string_view str, unsigned min, unsigned max)
 
template<EmptyParts keepOrRemove = EmptyParts::KEEP, typename Separators >
auto StringOp::split_view (std::string_view str, Separators separators)
 
bool StringOp::containsCaseInsensitive (std::string_view haystack, std::string_view needle)