rcpp_framework/core/utils.h

22 lines
655 B
C
Raw Normal View History

#ifndef UTILS_H
#define UTILS_H
#include <string>
2020-12-28 23:13:54 +01:00
#include <vector>
class Utils {
2020-12-28 23:13:54 +01:00
public:
static void newline_to_br(std::string *str);
//htmlspecialchars
2020-12-28 23:13:54 +01:00
static void markdown_to_html(std::string *str);
static std::string get_pagination(const std::string base_url, const uint32_t max, const uint32_t current_index, const uint32_t max_visible_links = 10);
static std::string get_pagination_links(const std::string base_url, const std::vector<std::string> &links, const uint32_t current_index, const uint32_t max_visible_links = 10);
static void str_replace(std::string *str, const std::string &from, const std::string &to);
protected:
};
#endif