SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Some static methods for string processing 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef StringUtils_h 00023 #define StringUtils_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 00037 00038 // =========================================================================== 00039 // class definitions 00040 // =========================================================================== 00045 class StringUtils { 00046 public: 00048 static std::string prune(std::string str); 00049 00051 static std::string to_lower_case(std::string str); 00052 00054 static std::string convertUmlaute(std::string str); 00055 00058 static std::string replace(std::string str, const char* what, 00059 const char* by); 00060 00062 static std::string toTimeString(int time); 00063 00072 static std::string escapeXML(const std::string& orig) ; 00073 00075 static std::string emptyString; 00076 00077 }; 00078 00079 00080 #endif 00081 00082 /****************************************************************************/ 00083