/
SoRusV
/
esp32_https_server
Обзор
Документация
Войти
/
SoRusV
/
esp32_https_server
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/util.hpp
35 строк
760 B
Frank Hessel
Handle percent encoding of URL and request parameters. Resolves #19
18 сен 2019, 02:35
Не верифицирован
18 сен 2019, 02:35
8bd4846
Код
Авторство
О чём код?
#ifndef SRC_UTIL_HPP_ #define SRC_UTIL_HPP_ #include <Arduino.h> #include <cmath> #include <string> namespace httpsserver { /** * \brief **Utility function**: Parse an unsigned integer from a string * * The second parameter can be used to define the maximum value that is acceptable */ uint32_t parseUInt(std::string const &s, uint32_t max = 0xffffffff); /** * \brief **Utility function**: Parse a signed integer from a string */ int32_t parseInt(std::string const &s); /** * \brief **Utility function**: Transform an int to a std::string */ std::string intToString(int i); } /** * \brief **Utility function**: Removes URL encoding from the string (e.g. %20 -> space) */ std::string urlDecode(std::string input); #endif /* SRC_UTIL_HPP_ */