MTK++ Latest version: 0.2.0

StringManip.h
Go to the documentation of this file.
00001 
00034 #ifndef STRINGMANIP_H
00035 #define STRINGMANIP_H
00036 
00037 #include <stdlib.h>
00038 #include <string.h>
00039 #include <vector>
00040 #include <ctype.h>
00041 #include <iostream>
00042 #include <fstream>
00043 #include "Utils/constants.h"
00044 
00045 namespace MTKpp
00046 {
00047 
00055 void splitString(std::string& s, const std::string s2, std::vector<std::string>& v, int i);
00056 
00063 std::string stripString(std::string const& str, char const* sepSet);
00064 
00071 std::string removeCharacter(const std::string& s, const char& c);
00072 
00080 std::string replaceCharacter(const std::string& s, const char& c, const char& n);
00081 
00089 std::string addCharacter(const std::string& s, char c,int i);
00090 
00098 bool FieldExists(std::string& s, int i, int j);
00099 
00106 std::string GetAlphaChar(std::string& s, int i);
00107 
00113 std::string int2String(int i);
00114 
00120 std::string uLongKind2String(ULONG_KIND i);
00121 
00127 unsigned int string2UInt(std::string s);
00128 
00134 int string2Int(std::string s);
00135 
00141 std::string double2String(double d);
00142 
00149 std::string double2String(double d, int precision);
00150 
00156 double string2Double(std::string s);
00157 
00163 std::string toUpper(std::string s);
00164 
00170 std::string toLower(std::string s);
00171 
00177 std::string baseName(std::string name);
00178 
00184 std::string extName(std::string e);
00185 
00191 bool fileExists(const std::string& fileName);
00192 
00199 bool containsSubStr(const std::string& s, const std::string& ss);
00200 
00208 std::string replaceSubStr(const std::string& s1, const std::string& s2, const std::string& s3);
00209 
00210 } // MTKpp namespace
00211 
00212 #endif // STRINGMANIP_H
00213 

Generated on Fri Dec 23 2011 09:28:52 for MTK++ by Doxygen 1.7.5.1