DUNE: Uniform Navigational Environment
2019.02.1
|
Static Public Member Functions | |
template<typename Iterator > | |
static std::string | join (Iterator begin, Iterator end, const std::string &separator) |
static std::string | filterDuplicates (char element, const std::string &subject) |
static std::string | ltrim (const std::string &str) |
static std::string | rtrim (const std::string &str) |
static void | rtrim (char *str) |
static void | resize (char *str, int size) |
static std::string | trim (const std::string &str) |
static void | split (const std::string &s, const std::string &sep, std::vector< std::string > &lst) |
template<typename Type > | |
static void | split (const std::string &s, const std::string &sep, std::vector< Type > &lst) |
template<typename Type > | |
static void | splitMulti (const std::string &s, const std::string &sep0, const std::string &sep1, std::vector< std::vector< Type > > &lst) |
static void | toLowerCase (std::string &str) |
static void | toUpperCase (std::string &str) |
static std::string | toHex (const std::string &str) |
static std::string | toHex (const std::vector< char > &str) |
static std::string | toHex (int nr) |
static std::string | fromHex (const std::string &str) |
static void | assign (std::vector< char > &dst, const char *src) |
static std::string | getRemaining (const std::string &prefix, const std::string &str) |
template<typename Type > | |
static std::string | str (Type t) |
static std::string | str (const char *format,...) |
static int | format (char *str, size_t size, const char *format,...) |
static void | replaceWhiteSpace (std::string &str, char rep) |
static std::string | replace (const std::string &str, char rep, const std::string &pat) |
static std::string | escape (const std::string &input) |
static std::string | unescape (const std::string &input, bool unescape_all=true) |
static bool | startsWith (const std::string &str, const std::string &prefix) |
static bool | endsWith (const std::string &str, const std::string &suffix) |
|
static |
Referenced by splitMulti().
|
static |
Test if string 'str' ends with a specified 'suffix'.
[in] | str | string. |
[in] | suffix | suffix. |
Referenced by format().
|
static |
Referenced by format(), and DUNE::IMC::toJSON().
|
static |
Filter duplicates of a given character in a string.
element | element to filter. |
subject | string to search for duplicates. |
Referenced by join(), and DUNE::FileSystem::Path::normalize().
|
inlinestatic |
References endsWith(), escape(), replace(), replaceWhiteSpace(), startsWith(), and unescape().
Referenced by DUNE::FileSystem::Path::applicationFile(), DUNE::Network::URL::encode(), DUNE::Hardware::SerialPort::enumerate(), DUNE::Concurrency::SharedMemory::open(), DUNE::Concurrency::SharedMemory::SharedMemory(), and toHex().
|
static |
Referenced by splitMulti().
|
static |
References str().
Referenced by splitMulti().
|
inlinestatic |
References filterDuplicates(), ltrim(), resize(), rtrim(), split(), str(), and trim().
Referenced by DUNE::Hardware::HayesModem::getRevision(), and DUNE::FileSystem::Path::normalize().
|
static |
|
static |
Referenced by format(), and DUNE::IMC::toJSON().
|
static |
Referenced by format().
|
static |
Resize string by replacing any extra characters with '\0'.
If size is greater than current size, the string is untouched. If size is lower than 0, the resulting size is [strlen(str) + size].
str | object string |
size | new size |
Referenced by join().
|
static |
|
static |
Strip whitespace from the end of a string, modifying the original string.
str | object string. |
|
static |
Split a string into a vector of strings.
s | string to split. |
sep | separator string. |
lst | vector of strings. |
References trim().
Referenced by Monitors::Entities::Task::activate(), DUNE::castLexical(), DUNE::FileSystem::Path::create(), DUNE::Tasks::SourceFilter::defineEntityFilter(), DUNE::Tasks::SourceFilter::defineMessageEntityFilter(), DUNE::Tasks::SourceFilter::defineMessageSystemEntityFilter(), DUNE::Tasks::SourceFilter::defineMessageSystemFilter(), DUNE::Tasks::SourceFilter::defineSystemEntityFilter(), DUNE::Tasks::SourceFilter::defineSystemFilter(), DUNE::IMC::Factory::getIds(), DUNE::Tasks::Manager::getTaskName(), DUNE::Tasks::Profiles::isSelected(), join(), DUNE::FileSystem::Path::normalize(), Simulators::Environment::Task::onResourceInitialization(), DUNE::Utils::TupleList::operator<<(), DUNE::Math::Matrix::readFromLines(), DUNE::Tasks::Profiles::select(), DUNE::Tasks::MessageFilter::setupEntities(), DUNE::Tasks::MessageFilter::setupRates(), splitMulti(), and DUNE::Tasks::Profiles::unselect().
|
inlinestatic |
Split a string into a vector of given type.
s | string to split. |
sep | separator string. |
lst | vector of Type. |
References trim().
|
inlinestatic |
References assign(), fromHex(), getRemaining(), split(), toHex(), toLowerCase(), and toUpperCase().
|
static |
Test if string 'str' starts with a specified 'prefix'.
[in] | str | string. |
[in] | prefix | prefix. |
Referenced by format().
|
inlinestatic |
Referenced by DUNE::Utils::OptionParser::add(), DUNE::Navigation::BasicNavigation::checkUncertainty(), DUNE::Power::Model::computeIMUEnergy(), DUNE::Control::BasicRemoteOperation::consume(), DUNE::Control::PathController::consume(), DUNE::Compression::Bzip2Decompressor::decompressBlock(), DUNE::Compression::ZlibDecompressor::decompressBlock(), DUNE::Parsers::NMEAReader::eos(), getRemaining(), DUNE::Hardware::IntelHEX::IntelHEX(), join(), DUNE::Coordinates::latitudeToNMEA(), DUNE::Coordinates::longitudeToNMEA(), DUNE::Control::PathController::onEntityReservation(), DUNE::Parsers::PlanConfigParser::parseZUnits(), DUNE::Tasks::Parameter::read(), DUNE::Math::Matrix::readFromLines(), DUNE::Streams::sanitize(), DUNE::Tasks::Profiles::select(), DUNE::Tasks::MessageFilter::setupRates(), DUNE::Control::BasicAutopilot::signalBadVertical(), DUNE::Control::BasicAutopilot::signalBadYaw(), Sensors::AIS::ShipTypeCode::translate(), Transports::IridiumSBD::SessionResultCode::translate(), DUNE::Tasks::Profiles::unselect(), DUNE::Monitors::ServoPositionMonitor< T >::updateAndTest(), and DUNE::Utils::OptionParser::usage().
|
inlinestatic |
|
static |
References format().
Referenced by splitMulti(), and DUNE::IMC::toJSON().
|
static |
References format().
|
static |
|
static |
|
static |
Referenced by DUNE::Hardware::LUCL::Protocol::setName(), and splitMulti().
|
static |
Strip whitespace from the beginning and end of a string.
str | object string. |
References ltrim(), and rtrim().
Referenced by join(), DUNE::Utils::TupleList::operator<<(), DUNE::Hardware::BasicModem::readRaw(), and split().
|
static |
Referenced by format().