openMSX
|
Classes | |
struct | casecmp |
struct | caseless |
struct | inv_caseless |
Enumerations | |
enum class | EmptyParts { KEEP , REMOVE } |
Functions | |
bool | stringToBool (string_view str) |
std::string | toLower (std::string_view str) |
void | trimRight (string &str, const char *chars) |
void | trimRight (string &str, char chars) |
void | trimRight (string_view &str, string_view chars) |
void | trimRight (string_view &str, char chars) |
void | trimLeft (string &str, const char *chars) |
void | trimLeft (string &str, char chars) |
void | trimLeft (string_view &str, string_view chars) |
void | trimLeft (string_view &str, char chars) |
void | trim (string_view &str, string_view chars) |
void | trim (string_view &str, char chars) |
std::pair< string_view, string_view > | splitOnFirst (string_view str, string_view chars) |
std::pair< string_view, string_view > | splitOnFirst (string_view str, char chars) |
std::pair< string_view, string_view > | splitOnLast (string_view str, string_view chars) |
std::pair< string_view, string_view > | splitOnLast (string_view str, char chars) |
IterableBitSet< 64 > | parseRange (string_view str, unsigned min, unsigned max) |
template<std::integral T> | |
std::optional< T > | 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 > | stringToBase (std::string_view s) |
As above, but without dynamic base detection. | |
template<EmptyParts keepOrRemove = EmptyParts::KEEP, typename Separators > | |
auto | split_view (std::string_view str, Separators separators) |
bool | containsCaseInsensitive (std::string_view haystack, std::string_view needle) |
|
strong |
Enumerator | |
---|---|
KEEP | |
REMOVE |
Definition at line 78 of file StringOp.hh.
|
inline |
Definition at line 181 of file StringOp.hh.
Referenced by openmsx::SymbolManager::detectType(), openmsx::filterIndices(), and TEST_CASE().
IterableBitSet< 64 > StringOp::parseRange | ( | string_view | str, |
unsigned | min, | ||
unsigned | max | ||
) |
Definition at line 181 of file StringOp.cc.
Referenced by openmsx::SoundDevice::registerSound(), and TEST_CASE().
|
inline |
Definition at line 83 of file StringOp.hh.
References begin(), and end().
Referenced by openmsx::SymbolManager::loadASMSX(), openmsx::ImGuiPalette::loadLine(), openmsx::SymbolManager::loadLines(), openmsx::SymbolManager::loadLinkMap(), openmsx::SymbolManager::loadVASM(), and openmsx::TTFFont::render().
std::pair< std::string_view, std::string_view > StringOp::splitOnFirst | ( | string_view | str, |
char | chars | ||
) |
Definition at line 103 of file StringOp.cc.
std::pair< std::string_view, std::string_view > StringOp::splitOnFirst | ( | string_view | str, |
string_view | chars | ||
) |
Definition at line 95 of file StringOp.cc.
Referenced by openmsx::SymbolManager::detectType(), openmsx::SymbolManager::loadASMSX(), openmsx::ImGuiOsdIcons::loadLine(), and openmsx::SymbolManager::loadLines().
std::pair< std::string_view, std::string_view > StringOp::splitOnLast | ( | string_view | str, |
char | chars | ||
) |
Definition at line 120 of file StringOp.cc.
std::pair< std::string_view, std::string_view > StringOp::splitOnLast | ( | string_view | str, |
string_view | chars | ||
) |
Definition at line 112 of file StringOp.cc.
std::optional< T > StringOp::stringTo | ( | std::string_view | s | ) |
Convert a string to an integral type 'T' (int, uint64_t, ...).
This is similar to, but not quite the same as the family of 'strtoll()' functions:
Definition at line 207 of file StringOp.hh.
std::optional< T > StringOp::stringToBase | ( | std::string_view | s | ) |
As above, but without dynamic base detection.
Moreover leading prefixes like '0x' for hexadecimal are seen as invalid input.
Definition at line 194 of file StringOp.hh.
bool StringOp::stringToBool | ( | string_view | str | ) |
Definition at line 16 of file StringOp.cc.
Referenced by openmsx::SettingsParser::attribute(), openmsx::DBParser::attribute(), openmsx::XMLElement::getAttributeValueAsBool(), openmsx::XMLElement::getChildDataAsBool(), openmsx::PersistentElement< C, bool >::load(), openmsx::PersistentElement< C, im::WindowStatus >::load(), openmsx::ImGuiMedia::loadLine(), openmsx::ImGuiOsdIcons::loadLine(), openmsx::ImGuiSoundChip::loadLine(), openmsx::ImGuiTools::loadLine(), and TEST_CASE().
std::string StringOp::toLower | ( | std::string_view | str | ) |
Definition at line 26 of file StringOp.cc.
References transform_in_place().
Referenced by openmsx::SymbolManager::detectType().
void StringOp::trim | ( | string_view & | str, |
char | chars | ||
) |
Definition at line 89 of file StringOp.cc.
References trimLeft(), and trimRight().
void StringOp::trim | ( | string_view & | str, |
string_view | chars | ||
) |
Definition at line 83 of file StringOp.cc.
References trimLeft(), and trimRight().
void StringOp::trimLeft | ( | string & | str, |
char | chars | ||
) |
Definition at line 66 of file StringOp.cc.
void StringOp::trimLeft | ( | string & | str, |
const char * | chars | ||
) |
Definition at line 62 of file StringOp.cc.
void StringOp::trimLeft | ( | string_view & | str, |
char | chars | ||
) |
Definition at line 76 of file StringOp.cc.
void StringOp::trimLeft | ( | string_view & | str, |
string_view | chars | ||
) |
Definition at line 70 of file StringOp.cc.
void StringOp::trimRight | ( | string & | str, |
char | chars | ||
) |
Definition at line 41 of file StringOp.cc.
void StringOp::trimRight | ( | string & | str, |
const char * | chars | ||
) |
Definition at line 33 of file StringOp.cc.
Referenced by openmsx::TTFFont::render(), trim(), and trim().
void StringOp::trimRight | ( | string_view & | str, |
char | chars | ||
) |
Definition at line 55 of file StringOp.cc.
void StringOp::trimRight | ( | string_view & | str, |
string_view | chars | ||
) |
Definition at line 49 of file StringOp.cc.