My Project
D:/source/c++/Programme/sally/sally/sallyAPI/StringHelper.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #pragma once
00029 #include "Define.h"
00030 #include <string>
00031 #include <vector>
00032 #include <iostream>
00033 #include <sstream>
00034 
00035 namespace SallyAPI
00036 {
00037         namespace String
00038         {
00047 
00048                 class DLL_API_SALLY StringHelper
00049                 {
00050                 private:
00051                         StringHelper();
00052                         ~StringHelper();
00053                 public:
00054                         static std::string              RemoveStringBetween(const std::string& searchInString, const std::string& first, const std::string& last);
00055                         static std::string              GetStringBetween(const std::string& searchInString, const std::string& first, const std::string& last);
00056                         static bool                     StringEndsWith(const std::string& str, const std::string& end);
00057                         static bool                     StringStartsWith(const std::string& str, const std::string& start);
00058                         static std::string              StringToUpper(const std::string& strToConvert);
00059                         static std::string              StringToLower(const std::string& strToConvert);
00060                         static std::vector<std::string> TokenizeString(const std::string& sString, const std::string& token);
00061                         static int                              ConvertToInt(const std::string& sString);
00062                         static std::string              ConvertToString(int i);
00063                         static std::string              ConvertToString(double i);
00064                         static std::string              ConvertToString(float i);
00065                         static std::string              ConvertToString(DWORD i);
00066                         static double                   ConvertToDouble(const std::string& sString);
00067                         static float                    ConvertToFloat(const std::string& sString);
00068                         static std::string              ConvertFloatToString(float i);
00069                         static std::string              ConvertDoubleToString(double i);
00070                         static std::string              ReplaceString(const std::string& in, const std::string& replaceThis, const std::string& replaceWith);
00071 
00072                         static std::string              base64_encode(unsigned char const* , unsigned int len);
00073                         static std::string              base64_decode(std::string const& s);
00074                         static bool                             StringCompareCaseInsensitivity(const std::string& left, const std::string& right);
00075                         static bool                             StripServerAddress(const std::string& completeURL, std::string& server, int& port, std::string& uri);
00076                         static bool                             StringContainsCaseInsensitivity(const std::string& left, const std::string& right);
00077                 };
00078         }
00079 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines