SUMO - Simulation of Urban MObility
|
Some static methods for string processing. More...
#include <StringUtils.h>
Static Public Member Functions | |
static std::string | convertUmlaute (std::string str) |
Converts german "Umlaute" to their latin-version. More... | |
static std::string | escapeXML (const std::string &orig) |
Replaces the standard escapes by their XML entities. More... | |
static std::string | prune (std::string str) |
Removes trailing and leading whitechars. More... | |
static std::string | replace (std::string str, const char *what, const char *by) |
static std::string | to_lower_case (std::string str) |
Transfers the content to lower case. More... | |
static std::string | toTimeString (int time) |
Builds a time string (hh:mm:ss) from the given seconds. More... | |
Static Public Attributes | |
static std::string | emptyString |
An empty string. More... | |
Some static methods for string processing.
Definition at line 45 of file StringUtils.h.
|
static |
Converts german "Umlaute" to their latin-version.
Definition at line 78 of file StringUtils.cpp.
References replace().
Referenced by PCLoaderDlrNavteq::loadPolyFile(), NIImporter_Vissim::VissimSingleTypeParser::readName(), and NBEdge::reinit().
|
static |
Replaces the standard escapes by their XML entities.
The strings &, <, >, ", and ' are replaced by &, <, >, ", and '
[in] | orig | The original string |
Definition at line 134 of file StringUtils.cpp.
References replace().
Referenced by PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NIImporter_OpenStreetMap::insertEdge(), PCPolyContainer::save(), RODFDetectorCon::save(), RODFDetectorCon::saveAsPOIs(), OptionsCont::writeConfiguration(), NWWriter_SUMO::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeNetwork(), RODFDetectorCon::writeSpeedTrigger(), MSInductLoop::writeTypedXMLOutput(), and RODFDetectorCon::writeValidationDetectors().
|
static |
Removes trailing and leading whitechars.
Definition at line 56 of file StringUtils.cpp.
Referenced by ODMatrix::getNextNonCommentLine(), OptionsCont::getStringVector(), PCLoaderArcView::load(), PCLoaderDlrNavteq::loadPOIFile(), PCLoaderDlrNavteq::loadPolyFile(), NIImporter_ITSUMO::Handler::myCharacters(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), ODMatrix::readO(), and ODMatrix::readV().
|
static |
Replaces all occurences of the second string by the third string within the first string
Definition at line 96 of file StringUtils.cpp.
Referenced by convertUmlaute(), escapeXML(), and NIImporter_ArcView::load().
|
static |
Transfers the content to lower case.
Definition at line 67 of file StringUtils.cpp.
Referenced by NamedColumnsParser::get(), NamedColumnsParser::know(), NIImporter_Vissim::VissimSingleTypeParser::myRead(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), NIImporter_Vissim::readContents(), NIImporter_Vissim::VissimSingleTypeParser::readEndSecure(), and NamedColumnsParser::reinitMap().
|
static |
Builds a time string (hh:mm:ss) from the given seconds.
Definition at line 114 of file StringUtils.cpp.
|
static |
An empty string.
Definition at line 75 of file StringUtils.h.