00001 #ifndef __msn_util_h__
00002 #define __msn_util_h__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <string>
00027 #include <map>
00028 #include <vector>
00029 #include <stdexcept>
00030
00031 namespace MSN
00032 {
00039 std::string encodeURL(const std::string & s);
00040
00047 std::string decodeURL(const std::string & s);
00048
00055 std::pair<std::string, int> splitServerAddress(const std::string & address, int default_port=1863);
00056
00059 int nocase_cmp(const std::string & s1, const std::string & s2);
00060
00063 std::vector<std::string> splitString(const std::string & string, const std::string & separator, bool suppressBlanks=true);
00064
00067 unsigned int decimalFromString(const std::string & s) throw (std::logic_error);
00068 }
00069 #endif