SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringUtils Class Reference

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 latin1_to_utf8 (std::string str)
 Transfers from Latin 1 (ISO-8859-1) to UTF-8. More...
 
static std::string prune (const 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...
 

Detailed Description

Some static methods for string processing.

Definition at line 45 of file StringUtils.h.

Member Function Documentation

std::string StringUtils::convertUmlaute ( std::string  str)
static

Converts german "Umlaute" to their latin-version.

Definition at line 95 of file StringUtils.cpp.

References replace().

Referenced by PCLoaderDlrNavteq::loadPolyFile(), NIImporter_Vissim::VissimSingleTypeParser::readName(), and NBEdge::reinit().

std::string StringUtils::escapeXML ( const std::string &  orig)
static
std::string StringUtils::latin1_to_utf8 ( std::string  str)
static

Transfers from Latin 1 (ISO-8859-1) to UTF-8.

Definition at line 78 of file StringUtils.cpp.

Referenced by PCLoaderArcView::load().

std::string StringUtils::replace ( std::string  str,
const char *  what,
const char *  by 
)
static

Replaces all occurences of the second string by the third string within the first string

Definition at line 113 of file StringUtils.cpp.

Referenced by convertUmlaute(), escapeXML(), and NIImporter_ArcView::load().

std::string StringUtils::toTimeString ( int  time)
static

Builds a time string (hh:mm:ss) from the given seconds.

Definition at line 131 of file StringUtils.cpp.

Field Documentation

std::string StringUtils::emptyString
static

An empty string.

Definition at line 78 of file StringUtils.h.


The documentation for this class was generated from the following files: