Function htmlTranslate

Summary

#include <lib/inc/drogon/HttpViewData.h>

(1) static std::string htmlTranslate(const char *str, size_t length)

(2) static std::string htmlTranslate(const std::string &str)

(3) static std::string htmlTranslate(const string_view &str)

Function overload

Synopsis

#include <lib/inc/drogon/HttpViewData.h>

static std::string htmlTranslate(const char *str, size_t length)

Description

Translate some special characters to HTML format.

such as:

" --> &quot;
& --> &amp;
< --> &lt;
> --> &gt;

Source

Line 142 in lib/inc/drogon/HttpViewData.h.

Synopsis

#include <lib/inc/drogon/HttpViewData.h>

static std::string htmlTranslate(const std::string &str)

Description

No description yet.

Source

Lines 143-146 in lib/inc/drogon/HttpViewData.h.

static std::string htmlTranslate(const std::string &str)
{
    return htmlTranslate(str.data(), str.length());
}

Synopsis

#include <lib/inc/drogon/HttpViewData.h>

static std::string htmlTranslate(const string_view &str)

Description

No description yet.

Source

Lines 147-150 in lib/inc/drogon/HttpViewData.h.

static std::string htmlTranslate(const string_view &str)
{
    return htmlTranslate(str.data(), str.length());
}





Add Discussion as Guest

Log in