openMSX
Classes | Functions
string_view.hh File Reference
#include <cassert>
#include <cstring>
#include <iosfwd>
#include <iterator>
#include <string>
#include <type_traits>
Include dependency graph for string_view.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  string_view
 This class implements a (close approximation) of the std::string_view class. More...
 

Functions

bool operator== (string_view x, string_view y)
 
bool operator< (string_view x, string_view y)
 
bool operator!= (string_view x, string_view y)
 
bool operator> (string_view x, string_view y)
 
bool operator<= (string_view x, string_view y)
 
bool operator>= (string_view x, string_view y)
 
unsigned fast_stou (string_view s)
 
std::ostream & operator<< (std::ostream &os, string_view s)
 
auto begin (const string_view &x)
 
auto end (const string_view &x)
 

Function Documentation

◆ begin()

auto begin ( const string_view x)
inline

Definition at line 151 of file string_view.hh.

References string_view::begin().

Referenced by openmsx::MSXMultiMemDevice::add(), openmsx::TclObject::addListElements(), openmsx::OSDWidget::addWidget(), ranges::all_of(), openmsx::AmdFlash::AmdFlash(), ranges::any_of(), append(), view::detail::Drop< Range >::begin(), view::detail::DropBack< Range >::begin(), view::detail::Transform< Range, UnaryOp >::begin(), ranges::binary_search(), openmsx::Completer::Completer(), contains(), ranges::copy(), strCatImpl::ConcatIntegral< T >::copy(), ranges::copy_if(), openmsx::IPSPatch::copyBlock(), ranges::count(), ranges::count_if(), openmsx::RawTrack::decodeAll(), openmsx::OSDWidget::deleteWidget(), view::detail::DropBack< Range >::end(), ranges::equal_range(), ranges::fill(), openmsx::Completer::filter(), ranges::find(), ranges::find_if(), find_if_unguarded(), find_unguarded(), openmsx::Display::findActiveLayer(), openmsx::Completer::formatListInColumns(), openmsx::OggReader::getAudio(), openmsx::WatchIO::getDevice(), openmsx::FilePool::getFile(), openmsx::Completer::getName(), openmsx::IPSPatch::IPSPatch(), ranges::is_sorted(), openmsx::ClockPin::isPeriodic(), ranges::lower_bound(), max_value(), min_value(), ranges::none_of(), detail::Joiner< Collection, Separator >::operator std::string(), strCatImpl::ConcatIntegral< T >::operator std::string(), openmsx::CollectionSaver< TC >::operator()(), partition_copy_remove(), circular_buffer< std::unique_ptr< openmsx::Frame > >::rend(), ranges::replace(), ranges::replace_if(), openmsx::OggReader::seek(), circular_buffer< std::unique_ptr< openmsx::Frame > >::set_capacity(), ranges::set_difference(), utf8::unchecked::size(), ranges::sort(), ranges::stable_sort(), openmsx::ConsoleLine::substr(), utf8::unchecked::substr(), sum(), detail::sum_of_sizes(), openmsx::GlobalCommandController::tabCompletion(), TEST_CASE(), openmsx::MSXCPUInterface::testUnsetExpanded(), openmsx::DBParser::text(), to_vector(), ranges::transform(), transform_in_place(), ranges::unique(), openmsx::DiskManipulator::unregisterDrive(), ranges::upper_bound(), openmsx::NowindHost::write(), openmsx::MSXtar::~MSXtar(), openmsx::OSDConsoleRenderer::~OSDConsoleRenderer(), and openmsx::ReverseManager::~ReverseManager().

◆ end()

auto end ( const string_view x)
inline

Definition at line 152 of file string_view.hh.

References string_view::end().

Referenced by openmsx::XMLElement::addAttribute(), openmsx::TclObject::addListElements(), openmsx::AviRecorder::addWave(), ranges::all_of(), openmsx::AmdFlash::AmdFlash(), ranges::any_of(), append(), view::detail::Drop< Range >::begin(), hash_set< openmsx::ProbeBase *, NameFromProbe, XXHasher >::begin(), ranges::binary_search(), openmsx::comp< 8 >(), openmsx::Completer::Completer(), strCatImpl::ConcatIntegral< T >::ConcatIntegral(), hash_map< string_view, std::weak_ptr< void >, XXHasher >::contains(), contains(), ranges::copy(), ranges::copy_if(), ranges::count(), ranges::count_if(), openmsx::LastDeltaBlocks::createNew(), openmsx::LastDeltaBlocks::createNullDiff(), openmsx::RawTrack::decodeAll(), openmsx::OSDWidget::deleteWidget(), view::detail::Drop< Range >::end(), view::detail::DropBack< Range >::end(), view::detail::Transform< Range, UnaryOp >::end(), ranges::equal_range(), openmsx::AfterCommand::execute(), openmsx::RomDatabase::fetchRomInfo(), ranges::fill(), openmsx::Completer::filter(), ranges::find(), ranges::find_if(), find_if_unguarded(), find_unguarded(), openmsx::Display::findActiveLayer(), openmsx::XMLElement::findAttributeInt(), openmsx::OSDTopWidget::findByName(), openmsx::XMLElement::findChild(), openmsx::XMLElement::findChildWithAttribute(), openmsx::MSXCommandController::findCommand(), openmsx::PluggingController::findConnector(), openmsx::MSXMixer::findDevice(), openmsx::MSXMotherBoard::findDevice(), openmsx::MSXMotherBoard::findExtension(), openmsx::PluggingController::findPluggable(), openmsx::Debugger::findProbe(), openmsx::UserSettings::findSetting(), openmsx::SettingsManager::findSetting(), openmsx::Completer::formatListInColumns(), openmsx::EnumSettingBase::fromStringBase(), openmsx::TTFFontPool::get(), openmsx::UnicodeKeymap::get(), openmsx::CasImage::getAmplificationFactorImpl(), openmsx::XMLElement::getAttribute(), openmsx::XMLElement::getAttributeAsBool(), openmsx::XMLElement::getAttributeAsInt(), openmsx::OggReader::getAudio(), openmsx::RomInfo::getBlockSize(), openmsx::OggReader::getChapter(), openmsx::Keys::getCode(), openmsx::ResampleCoeffs::getCoeffs(), openmsx::RomInfo::getDescription(), openmsx::ImagePrinterMSX::getDescription(), openmsx::FilePool::getFile(), openmsx::Reactor::getHwConfigs(), openmsx::HDImageCLI::getImageForId(), openmsx::Completer::getName(), openmsx::FilePool::getSha1Sum(), openmsx::XMLElement::hasAttribute(), hash_map< string_view, std::weak_ptr< void >, XXHasher >::insert_or_assign(), openmsx::PolymorphicSaverRegistry< Archive >::instance(), openmsx::IPSPatch::IPSPatch(), ranges::is_sorted(), utf8::is_valid(), openmsx::ClockPin::isPeriodic(), openmsx::SettingsManager::loadSettings(), ranges::lower_bound(), max_value(), min_value(), ranges::none_of(), detail::Joiner< Collection, Separator >::operator std::string(), openmsx::Scale_1on2< Pixel >::operator()(), openmsx::CollectionSaver< TC >::operator()(), hash_map< string_view, std::weak_ptr< void >, XXHasher >::operator[](), openmsx::CommandLineParser::parse(), partition_copy_remove(), openmsx::ImagePrinter::printVisibleCharacter(), utf8::prior(), circular_buffer< std::unique_ptr< openmsx::Frame > >::rbegin(), openmsx::DiskManipulator::registerDrive(), openmsx::CommandLineParser::registerFileType(), openmsx::GlobalCommandController::registerProxyCommand(), openmsx::GlobalCommandController::registerProxySetting(), openmsx::XMLElement::removeAttribute(), openmsx::OSDTopWidget::removeName(), openmsx::MSXCPUInterface::removeWatchPoint(), openmsx::Display::repaint(), ranges::replace(), ranges::replace_if(), openmsx::InputArchiveBase2::resetSharedPtr(), openmsx::HotKey::saveBindings(), openmsx::OggReader::seek(), ranges::set_difference(), openmsx::XMLElement::setAttribute(), utf8::unchecked::size(), ranges::sort(), ranges::stable_sort(), openmsx::ConsoleLine::substr(), utf8::unchecked::substr(), sum(), detail::sum_of_sizes(), openmsx::AfterCommand::tabCompletion(), openmsx::GlobalCommandController::tabCompletion(), TEST_CASE(), openmsx::MSXCPUInterface::testUnsetExpanded(), openmsx::DBParser::text(), to_vector(), openmsx::TigerHash::toString(), ranges::transform(), transform_in_place(), ranges::unique(), openmsx::DiskManipulator::unregisterDrive(), openmsx::GlobalCommandController::unregisterProxyCommand(), openmsx::GlobalCommandController::unregisterProxySetting(), openmsx::Interpreter::unregisterSetting(), openmsx::InfoCommand::unregisterTopic(), openmsx::VideoSourceSetting::unregisterVideoSource(), openmsx::GLPostProcessor::update(), openmsx::RawTrack::updateCrc(), ranges::upper_bound(), openmsx::NowindHost::write(), openmsx::RawTrack::write(), openmsx::CompressedFileAdapter::~CompressedFileAdapter(), openmsx::OSDConsoleRenderer::~OSDConsoleRenderer(), openmsx::ReverseManager::~ReverseManager(), and openmsx::Scheduler::~Scheduler().

◆ fast_stou()

unsigned fast_stou ( string_view  s)

◆ operator!=()

bool operator!= ( string_view  x,
string_view  y 
)
inline

Definition at line 120 of file string_view.hh.

◆ operator<()

bool operator< ( string_view  x,
string_view  y 
)

Definition at line 138 of file string_view.cc.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
string_view  s 
)

Definition at line 160 of file string_view.cc.

References string_view::data(), and string_view::size().

Referenced by operator>=().

◆ operator<=()

bool operator<= ( string_view  x,
string_view  y 
)
inline

Definition at line 122 of file string_view.hh.

◆ operator==()

bool operator== ( string_view  x,
string_view  y 
)
inline

Definition at line 114 of file string_view.hh.

◆ operator>()

bool operator> ( string_view  x,
string_view  y 
)
inline

Definition at line 121 of file string_view.hh.

◆ operator>=()

bool operator>= ( string_view  x,
string_view  y 
)
inline

Definition at line 123 of file string_view.hh.

References fast_stou(), and operator<<().