1234567891011121314151617181920212223242526272829 |
- /*
- * urlencode.h
- *
- * Created on: 2022年6月1日
- * Author: dingxy
- */
- #ifndef _CORE_URLENCODE_H_
- #define _CORE_URLENCODE_H_
- #include <string>
- #include <ctype.h>
-
- //#define ASC2_0 48
- //#define ASC2_A 65
- //#define ASC2_Z 90
- //#define ASC2_a 97
- //#define ASC2_z 122
-
- using namespace std;
-
- unsigned char toHex(unsigned char c);
- unsigned char fromHex(unsigned char h);
- void encodeUrl(const string& str, string& result);
- void encodeUrl(const char* str, string& result);
- void decodeUrl(const string& str, string& result);
- void decodeUrl(const char* str, string& result);
- #endif
|