https://github.com/xadillax/liburlencode
C++ library for urlencode.
https://github.com/xadillax/liburlencode
cpp cpp-library urlencode
Last synced: 4 months ago
JSON representation
C++ library for urlencode.
- Host: GitHub
- URL: https://github.com/xadillax/liburlencode
- Owner: XadillaX
- License: mit
- Created: 2021-06-19T08:52:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-29T03:50:47.000Z (almost 4 years ago)
- Last Synced: 2025-03-28T18:51:50.432Z (11 months ago)
- Topics: cpp, cpp-library, urlencode
- Language: Python
- Homepage:
- Size: 2.92 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# liburlencode
C library for urlencode.
> Inspired from https://github.com/dnmfarrell/URI-Encode-C.
## Preparation
+ [make](https://www.gnu.org/software/make/)
+ [Python](https://www.python.org/)
## Build
### Static Library
```shell
$ make
$ make BUILDTYPE=Debug
```
The static library will be at `out/$(BUILDTYPE)/libencode.a`.
### Example
```shell
$ make example
$ make BUILDTYPE=Debug example
```
The example executable binary will be at `out/$(BUILDTYPE)/example`.
## Usage
```cpp
size_t Encode(const char* src, const size_t len, char* dst, bool space_to_plus);
size_t Decode(const char* src, const size_t len, char* dst, bool plus_to_space);
```
**If you're encoding, make sure that the `dst`'s total length be 3 times as `src`'s.** You may refers to `example/main.cc`.