2020-01-03 12:47:36 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
2020-11-13 13:39:58 +01:00
< meta name = "generator" content = "Doxygen 1.8.17" / >
2020-01-03 12:47:36 +01:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > mastodonpp: mastodonpp Namespace Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td id = "projectalign" style = "padding-left: 0.5em;" >
< div id = "projectname" > mastodonpp
2020-11-13 13:39:58 +01:00
  < span id = "projectnumber" > 0.5.5< / span >
2020-01-03 12:47:36 +01:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2020-11-13 13:39:58 +01:00
<!-- Generated by Doxygen 1.8.17 -->
2020-01-03 12:47:36 +01:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */< / script >
< div id = "main-nav" > < / div >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#nested-classes" > Classes< / a > |
2020-01-06 14:47:08 +01:00
< a href = "#typedef-members" > Typedefs< / a > |
2020-01-05 13:28:39 +01:00
< a href = "#enum-members" > Enumerations< / a > |
2020-01-03 12:47:36 +01:00
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" >
< div class = "title" > mastodonpp Namespace Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
2020-01-05 13:28:39 +01:00
< p > C++ wrapper for the Mastodon API.
2020-01-03 12:47:36 +01:00
< a href = "namespacemastodonpp.html#details" > More...< / a > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "nested-classes" > < / a >
Classes< / h2 > < / td > < / tr >
2020-01-04 11:40:17 +01:00
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structmastodonpp_1_1answer__type.html" > answer_type< / a > < / td > < / tr >
2020-01-05 13:28:39 +01:00
< tr class = "memdesc:" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Return type for Requests. < a href = "structmastodonpp_1_1answer__type.html#details" > More...< / a > < br / > < / td > < / tr >
2020-01-04 11:40:17 +01:00
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > class   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classmastodonpp_1_1API.html" > API< / a > < / td > < / tr >
2020-01-06 09:51:44 +01:00
< tr class = "memdesc:" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Holds API endpoints. < a href = "classmastodonpp_1_1API.html#details" > More...< / a > < br / > < / td > < / tr >
2020-01-04 11:40:17 +01:00
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-05 13:28:39 +01:00
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > class   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classmastodonpp_1_1Connection.html" > Connection< / a > < / td > < / tr >
< tr class = "memdesc:" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Represents a connection to an instance. Used for requests. < a href = "classmastodonpp_1_1Connection.html#details" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-04 11:40:17 +01:00
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > class   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classmastodonpp_1_1CURLException.html" > CURLException< / a > < / td > < / tr >
< tr class = "memdesc:" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Exception for libcurl errors. < a href = "classmastodonpp_1_1CURLException.html#details" > More...< / a > < br / > < / td > < / tr >
2020-01-03 12:47:36 +01:00
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-05 13:28:39 +01:00
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > class   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classmastodonpp_1_1CURLWrapper.html" > CURLWrapper< / a > < / td > < / tr >
< tr class = "memdesc:" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Handles the details of network connections. < a href = "classmastodonpp_1_1CURLWrapper.html#details" > More...< / a > < br / > < / td > < / tr >
2020-01-03 12:47:36 +01:00
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-09 18:51:18 +01:00
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structmastodonpp_1_1event__type.html" > event_type< / a > < / td > < / tr >
< tr class = "memdesc:" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > A stream event. < a href = "structmastodonpp_1_1event__type.html#details" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-05 13:28:39 +01:00
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > class   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classmastodonpp_1_1Instance.html" > Instance< / a > < / td > < / tr >
< tr class = "memdesc:" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Holds the access data of an instance. < a href = "classmastodonpp_1_1Instance.html#details" > More...< / a > < br / > < / td > < / tr >
2020-01-03 12:47:36 +01:00
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
2020-01-06 14:47:08 +01:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "typedef-members" > < / a >
Typedefs< / h2 > < / td > < / tr >
2020-01-08 22:43:13 +01:00
< tr class = "memitem:ad228a850ba86374f95d9fa1fece3c33b" > < td class = "memItemLeft" align = "right" valign = "top" > using  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b" > endpoint_variant< / a > = variant< < a class = "el" href = "classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f" > API::endpoint_type< / a > , string_view > < / td > < / tr >
< tr class = "memdesc:ad228a850ba86374f95d9fa1fece3c33b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > An endpoint. Either < a class = "el" href = "classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f" title = "Type for endpoints. Can be API::v1, API::v2, API::oauth, API::other or API::pleroma." > API::endpoint_type< / a > or < code > std::string_view< / code > . < a href = "namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ad228a850ba86374f95d9fa1fece3c33b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af8b3b89118adeccc71c54dfd36c987f6" > < td class = "memItemLeft" align = "right" valign = "top" > using  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6" > parametermap< / a > = map< string_view, variant< string_view, vector< string_view > > > < / td > < / tr >
2020-01-10 19:10:54 +01:00
< tr class = "memdesc:af8b3b89118adeccc71c54dfd36c987f6" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > < code > std::map< / code > of parameters for API calls. < a href = "namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6" > More...< / a > < br / > < / td > < / tr >
2020-01-08 22:43:13 +01:00
< tr class = "separator:af8b3b89118adeccc71c54dfd36c987f6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-10 19:10:54 +01:00
< tr class = "memitem:a63b360bdefd56276e903619eb6a76049" > < td class = "memItemLeft" align = "right" valign = "top" > using  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemastodonpp.html#a63b360bdefd56276e903619eb6a76049" > parameterpair< / a > = pair< string_view, variant< string_view, vector< string_view > > > < / td > < / tr >
< tr class = "memdesc:a63b360bdefd56276e903619eb6a76049" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > A single parameter of a parametermap. < a href = "namespacemastodonpp.html#a63b360bdefd56276e903619eb6a76049" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a63b360bdefd56276e903619eb6a76049" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-06 14:47:08 +01:00
< / table > < table class = "memberdecls" >
2020-01-05 13:28:39 +01:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "enum-members" > < / a >
Enumerations< / h2 > < / td > < / tr >
2020-01-06 09:51:44 +01:00
< tr class = "memitem:a7d60fc71ad0fb1fbd467b37fe1f1f100" > < td class = "memItemLeft" align = "right" valign = "top" > enum   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100" > http_method< / a > { < br / >
    < b > GET< / b > ,
< b > POST< / b > ,
< b > PATCH< / b > ,
< b > PUT< / b > ,
< br / >
    < b > DELETE< / b >
< br / >
2020-01-05 13:28:39 +01:00
}< / td > < / tr >
< tr class = "memdesc:a7d60fc71ad0fb1fbd467b37fe1f1f100" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The HTTP method. < a href = "namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a7d60fc71ad0fb1fbd467b37fe1f1f100" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
2020-01-03 12:47:36 +01:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
2020-01-16 18:34:50 +01:00
< tr class = "memitem:a4e42b93c60074920fb731ab6ba797935" > < td class = "memItemLeft" align = "right" valign = "top" > string  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935" > unescape_html< / a > (string html)< / td > < / tr >
< tr class = "memdesc:a4e42b93c60074920fb731ab6ba797935" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Replaces HTML entities with UTF-8 characters. < a href = "namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a4e42b93c60074920fb731ab6ba797935" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-04 11:40:17 +01:00
< tr class = "memitem:a9a5182698aabe03eb3a682b40053083d" > < td class = "memItemLeft" align = "right" valign = "top" > std::ostream &   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemastodonpp.html#a9a5182698aabe03eb3a682b40053083d" > operator< < < / a > (std::ostream & out, const < a class = "el" href = "structmastodonpp_1_1answer__type.html" > answer_type< / a > & answer)< / td > < / tr >
< tr class = "separator:a9a5182698aabe03eb3a682b40053083d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2020-01-03 12:47:36 +01:00
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
2020-01-05 13:28:39 +01:00
< div class = "textblock" > < p > C++ wrapper for the Mastodon API. < / p >
2020-01-03 12:47:36 +01:00
< dl class = "section since" > < dt > Since< / dt > < dd > 0.1.0 < / dd > < / dl >
2020-01-06 14:47:08 +01:00
< / div > < h2 class = "groupheader" > Typedef Documentation< / h2 >
2020-01-08 22:43:13 +01:00
< a id = "ad228a850ba86374f95d9fa1fece3c33b" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ad228a850ba86374f95d9fa1fece3c33b" > ◆ < / a > < / span > endpoint_variant< / h2 >
2020-01-06 14:47:08 +01:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2020-01-08 22:43:13 +01:00
< td class = "memname" > using < a class = "el" href = "namespacemastodonpp.html#ad228a850ba86374f95d9fa1fece3c33b" > mastodonpp::endpoint_variant< / a > = typedef variant< < a class = "el" href = "classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f" > API::endpoint_type< / a > ,string_view> < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > An endpoint. Either < a class = "el" href = "classmastodonpp_1_1API.html#a66d340a2e61c4254feb79f17f6773e4f" title = "Type for endpoints. Can be API::v1, API::v2, API::oauth, API::other or API::pleroma." > API::endpoint_type< / a > or < code > std::string_view< / code > . < / p >
< dl class = "section since" > < dt > Since< / dt > < dd > 0.1.0 < / dd > < / dl >
< / div >
< / div >
< a id = "af8b3b89118adeccc71c54dfd36c987f6" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#af8b3b89118adeccc71c54dfd36c987f6" > ◆ < / a > < / span > parametermap< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > using < a class = "el" href = "namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6" > mastodonpp::parametermap< / a > = typedef map< string_view, variant< string_view, vector< string_view> > > < / td >
2020-01-06 14:47:08 +01:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2020-01-10 19:10:54 +01:00
< p > < code > std::map< / code > of parameters for API calls. < / p >
2020-01-11 17:19:34 +01:00
< p > Note that arrays always have to be specified as vectors, even if they have only 1 element. To send a file, use “< code > @file:< / code > ” followed by the file name as value.< / p >
2020-01-08 22:43:13 +01:00
< p > Example: < / p > < div class = "fragment" > < div class = "line" > < a class = "code" href = "namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6" > parametermap< / a > parameters< / div >
2020-01-06 14:47:08 +01:00
< div class = "line" > {< / div >
2020-01-11 17:19:34 +01:00
< div class = "line" > {< span class = "stringliteral" > " poll[expires_in]" < / span > , < span class = "stringliteral" > " 86400" < / span > },< / div >
< div class = "line" > {< span class = "stringliteral" > " poll[options]" < / span > , vector< string_view> {< span class = "stringliteral" > " Yes" < / span > , < span class = "stringliteral" > " No" < / span > , < span class = "stringliteral" > " Maybe" < / span > }},< / div >
< div class = "line" > {< span class = "stringliteral" > " status" < / span > , < span class = "stringliteral" > " How is the weather?" < / span > }< / div >
2020-01-06 14:47:08 +01:00
< div class = "line" > };< / div >
< / div > <!-- fragment --> < dl class = "section since" > < dt > Since< / dt > < dd > 0.1.0 < / dd > < / dl >
2020-01-10 19:10:54 +01:00
< / div >
< / div >
< a id = "a63b360bdefd56276e903619eb6a76049" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a63b360bdefd56276e903619eb6a76049" > ◆ < / a > < / span > parameterpair< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > using < a class = "el" href = "namespacemastodonpp.html#a63b360bdefd56276e903619eb6a76049" > mastodonpp::parameterpair< / a > = typedef pair< string_view, variant< string_view, vector< string_view> > > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > A single parameter of a parametermap. < / p >
< dl class = "section since" > < dt > Since< / dt > < dd > 0.1.0 < / dd > < / dl >
2020-01-06 14:47:08 +01:00
< / div >
< / div >
< h2 class = "groupheader" > Enumeration Type Documentation< / h2 >
2020-01-05 13:28:39 +01:00
< a id = "a7d60fc71ad0fb1fbd467b37fe1f1f100" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a7d60fc71ad0fb1fbd467b37fe1f1f100" > ◆ < / a > < / span > http_method< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > enum < a class = "el" href = "namespacemastodonpp.html#a7d60fc71ad0fb1fbd467b37fe1f1f100" > mastodonpp::http_method< / a > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > strong< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > The HTTP method. < / p >
< dl class = "section since" > < dt > Since< / dt > < dd > 0.1.0 < / dd > < / dl >
2020-01-14 23:20:02 +01:00
< div class = "fragment" > < div class = "line" > < a name = "l00041" > < / a > < span class = "lineno" > 41< / span >   {< / div >
2020-02-03 07:58:41 +01:00
< div class = "line" > < a name = "l00042" > < / a > < span class = "lineno" > 42< / span >   GET, < span class = "comment" > // NOLINT(readability-identifier-naming)< / span > < / div >
< div class = "line" > < a name = "l00043" > < / a > < span class = "lineno" > 43< / span >   POST, < span class = "comment" > // NOLINT(readability-identifier-naming)< / span > < / div >
< div class = "line" > < a name = "l00044" > < / a > < span class = "lineno" > 44< / span >   PATCH, < span class = "comment" > // NOLINT(readability-identifier-naming)< / span > < / div >
< div class = "line" > < a name = "l00045" > < / a > < span class = "lineno" > 45< / span >   PUT, < span class = "comment" > // NOLINT(readability-identifier-naming)< / span > < / div >
< div class = "line" > < a name = "l00046" > < / a > < span class = "lineno" > 46< / span >   DELETE < span class = "comment" > // NOLINT(readability-identifier-naming)< / span > < / div >
2020-01-14 23:20:02 +01:00
< div class = "line" > < a name = "l00047" > < / a > < span class = "lineno" > 47< / span >   };< / div >
2020-01-05 13:28:39 +01:00
< / div > <!-- fragment -->
< / div >
< / div >
< h2 class = "groupheader" > Function Documentation< / h2 >
2020-01-04 11:40:17 +01:00
< a id = "a9a5182698aabe03eb3a682b40053083d" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a9a5182698aabe03eb3a682b40053083d" > ◆ < / a > < / span > operator< < ()< / h2 >
2020-01-03 12:47:36 +01:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > std::ostream& mastodonpp::operator< < < / td >
< td > (< / td >
< td class = "paramtype" > std::ostream &   < / td >
< td class = "paramname" > < em > out< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2020-01-04 11:40:17 +01:00
< td class = "paramtype" > const < a class = "el" href = "structmastodonpp_1_1answer__type.html" > answer_type< / a > &   < / td >
2020-01-03 12:47:36 +01:00
< td class = "paramname" > < em > answer< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< dl class = "section since" > < dt > Since< / dt > < dd > 0.1.0 < / dd > < / dl >
2020-01-14 23:20:02 +01:00
< div class = "fragment" > < div class = "line" > < a name = "l00040" > < / a > < span class = "lineno" > 40< / span >   {< / div >
< div class = "line" > < a name = "l00041" > < / a > < span class = "lineno" > 41< / span >   out < < answer.body;< / div >
< div class = "line" > < a name = "l00042" > < / a > < span class = "lineno" > 42< / span >   < span class = "keywordflow" > return< / span > out;< / div >
< div class = "line" > < a name = "l00043" > < / a > < span class = "lineno" > 43< / span >   }< / div >
2020-01-03 12:47:36 +01:00
< / div > <!-- fragment -->
< / div >
< / div >
2020-01-16 18:34:50 +01:00
< a id = "a4e42b93c60074920fb731ab6ba797935" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a4e42b93c60074920fb731ab6ba797935" > ◆ < / a > < / span > unescape_html()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > string mastodonpp::unescape_html < / td >
< td > (< / td >
< td class = "paramtype" > string  < / td >
< td class = "paramname" > < em > html< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Replaces HTML entities with UTF-8 characters. < / p >
< p > Supports named and numbered entities, decimal and hexadecimal.< / p >
< p > Example: < / p > < div class = "fragment" > < div class = "line" > < span class = "comment" > // Will output: 2€ = 2€ = 2€< / span > < / div >
< div class = "line" > std::cout < < < a class = "code" href = "namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935" > mastodonpp::unescape_html< / a > (< span class = "stringliteral" > " 2& euro; = 2& #8364; = 2& #x20ac;" < / span > );< / div >
< / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > html< / td > < td > The HTML to unescape.< / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section since" > < dt > Since< / dt > < dd > 0.4.0 < / dd > < / dl >
2020-02-03 07:58:41 +01:00
< div class = "fragment" > < div class = "line" > < a name = "l00040" > < / a > < span class = "lineno" > 40< / span >   {< / div >
< div class = "line" > < a name = "l00041" > < / a > < span class = "lineno" > 41< / span >   < span class = "keywordtype" > string< / span > buffer{move(html)};< / div >
< div class = "line" > < a name = "l00042" > < / a > < span class = "lineno" > 42< / span >   < span class = "keywordtype" > string< / span > output;< / div >
< div class = "line" > < a name = "l00043" > < / a > < span class = "lineno" > 43< / span >   < / div >
< div class = "line" > < a name = "l00044" > < / a > < span class = "lineno" > 44< / span >   < span class = "comment" > // Source: https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_< / span > < / div >
< div class = "line" > < a name = "l00045" > < / a > < span class = "lineno" > 45< / span >   < span class = "comment" > // entity_references#Character_entity_references_in_HTML< / span > < / div >
< div class = "line" > < a name = "l00046" > < / a > < span class = "lineno" > 46< / span >   < span class = "keyword" > const< / span > map< string_view, char32_t> names< / div >
2020-03-12 12:26:31 +01:00
< div class = "line" > < a name = "l00047" > < / a > < span class = "lineno" > 47< / span >   {< / div >
< div class = "line" > < a name = "l00048" > < / a > < span class = "lineno" > 48< / span >   { < span class = "stringliteral" > " exclamation" < / span > , 0x0021 }, { < span class = "stringliteral" > " quot" < / span > , 0x0022 },< / div >
< div class = "line" > < a name = "l00049" > < / a > < span class = "lineno" > 49< / span >   { < span class = "stringliteral" > " percent" < / span > , 0x0025 }, { < span class = "stringliteral" > " amp" < / span > , 0x0026 },< / div >
< div class = "line" > < a name = "l00050" > < / a > < span class = "lineno" > 50< / span >   { < span class = "stringliteral" > " apos" < / span > , 0x0027 }, { < span class = "stringliteral" > " add" < / span > , 0x002B },< / div >
< div class = "line" > < a name = "l00051" > < / a > < span class = "lineno" > 51< / span >   { < span class = "stringliteral" > " lt" < / span > , 0x003C }, { < span class = "stringliteral" > " equal" < / span > , 0x003D },< / div >
< div class = "line" > < a name = "l00052" > < / a > < span class = "lineno" > 52< / span >   { < span class = "stringliteral" > " gt" < / span > , 0x003E }, { < span class = "stringliteral" > " nbsp" < / span > , 0x00A0 },< / div >
< div class = "line" > < a name = "l00053" > < / a > < span class = "lineno" > 53< / span >   { < span class = "stringliteral" > " iexcl" < / span > , 0x00A1 }, { < span class = "stringliteral" > " cent" < / span > , 0x00A2 },< / div >
< div class = "line" > < a name = "l00054" > < / a > < span class = "lineno" > 54< / span >   { < span class = "stringliteral" > " pound" < / span > , 0x00A3 }, { < span class = "stringliteral" > " curren" < / span > , 0x00A4 },< / div >
< div class = "line" > < a name = "l00055" > < / a > < span class = "lineno" > 55< / span >   { < span class = "stringliteral" > " yen" < / span > , 0x00A5 }, { < span class = "stringliteral" > " brvbar" < / span > , 0x00A6 },< / div >
< div class = "line" > < a name = "l00056" > < / a > < span class = "lineno" > 56< / span >   { < span class = "stringliteral" > " sect" < / span > , 0x00A7 }, { < span class = "stringliteral" > " uml" < / span > , 0x00A8 },< / div >
< div class = "line" > < a name = "l00057" > < / a > < span class = "lineno" > 57< / span >   { < span class = "stringliteral" > " copy" < / span > , 0x00A9 }, { < span class = "stringliteral" > " ordf" < / span > , 0x00AA },< / div >
< div class = "line" > < a name = "l00058" > < / a > < span class = "lineno" > 58< / span >   { < span class = "stringliteral" > " laquo" < / span > , 0x00AB }, { < span class = "stringliteral" > " not" < / span > , 0x00AC },< / div >
< div class = "line" > < a name = "l00059" > < / a > < span class = "lineno" > 59< / span >   { < span class = "stringliteral" > " shy" < / span > , 0x00AD }, { < span class = "stringliteral" > " reg" < / span > , 0x00AE },< / div >
< div class = "line" > < a name = "l00060" > < / a > < span class = "lineno" > 60< / span >   { < span class = "stringliteral" > " macr" < / span > , 0x00AF }, { < span class = "stringliteral" > " deg" < / span > , 0x00B0 },< / div >
< div class = "line" > < a name = "l00061" > < / a > < span class = "lineno" > 61< / span >   { < span class = "stringliteral" > " plusmn" < / span > , 0x00B1 }, { < span class = "stringliteral" > " sup2" < / span > , 0x00B2 },< / div >
< div class = "line" > < a name = "l00062" > < / a > < span class = "lineno" > 62< / span >   { < span class = "stringliteral" > " sup3" < / span > , 0x00B3 }, { < span class = "stringliteral" > " acute" < / span > , 0x00B4 },< / div >
< div class = "line" > < a name = "l00063" > < / a > < span class = "lineno" > 63< / span >   { < span class = "stringliteral" > " micro" < / span > , 0x00B5 }, { < span class = "stringliteral" > " para" < / span > , 0x00B6 },< / div >
< div class = "line" > < a name = "l00064" > < / a > < span class = "lineno" > 64< / span >   { < span class = "stringliteral" > " middot" < / span > , 0x00B7 }, { < span class = "stringliteral" > " cedil" < / span > , 0x00B8 },< / div >
< div class = "line" > < a name = "l00065" > < / a > < span class = "lineno" > 65< / span >   { < span class = "stringliteral" > " sup1" < / span > , 0x00B9 }, { < span class = "stringliteral" > " ordm" < / span > , 0x00BA },< / div >
< div class = "line" > < a name = "l00066" > < / a > < span class = "lineno" > 66< / span >   { < span class = "stringliteral" > " raquo" < / span > , 0x00BB }, { < span class = "stringliteral" > " frac14" < / span > , 0x00BC },< / div >
< div class = "line" > < a name = "l00067" > < / a > < span class = "lineno" > 67< / span >   { < span class = "stringliteral" > " frac12" < / span > , 0x00BD }, { < span class = "stringliteral" > " frac34" < / span > , 0x00BE },< / div >
< div class = "line" > < a name = "l00068" > < / a > < span class = "lineno" > 68< / span >   { < span class = "stringliteral" > " iquest" < / span > , 0x00BF }, { < span class = "stringliteral" > " Agrave" < / span > , 0x00C0 },< / div >
< div class = "line" > < a name = "l00069" > < / a > < span class = "lineno" > 69< / span >   { < span class = "stringliteral" > " Aacute" < / span > , 0x00C1 }, { < span class = "stringliteral" > " Acirc" < / span > , 0x00C2 },< / div >
< div class = "line" > < a name = "l00070" > < / a > < span class = "lineno" > 70< / span >   { < span class = "stringliteral" > " Atilde" < / span > , 0x00C3 }, { < span class = "stringliteral" > " Auml" < / span > , 0x00C4 },< / div >
< div class = "line" > < a name = "l00071" > < / a > < span class = "lineno" > 71< / span >   { < span class = "stringliteral" > " Aring" < / span > , 0x00C5 }, { < span class = "stringliteral" > " AElig" < / span > , 0x00C6 },< / div >
< div class = "line" > < a name = "l00072" > < / a > < span class = "lineno" > 72< / span >   { < span class = "stringliteral" > " Ccedil" < / span > , 0x00C7 }, { < span class = "stringliteral" > " Egrave" < / span > , 0x00C8 },< / div >
< div class = "line" > < a name = "l00073" > < / a > < span class = "lineno" > 73< / span >   { < span class = "stringliteral" > " Eacute" < / span > , 0x00C9 }, { < span class = "stringliteral" > " Ecirc" < / span > , 0x00CA },< / div >
< div class = "line" > < a name = "l00074" > < / a > < span class = "lineno" > 74< / span >   { < span class = "stringliteral" > " Euml" < / span > , 0x00CB }, { < span class = "stringliteral" > " Igrave" < / span > , 0x00CC },< / div >
< div class = "line" > < a name = "l00075" > < / a > < span class = "lineno" > 75< / span >   { < span class = "stringliteral" > " Iacute" < / span > , 0x00CD }, { < span class = "stringliteral" > " Icirc" < / span > , 0x00CE },< / div >
< div class = "line" > < a name = "l00076" > < / a > < span class = "lineno" > 76< / span >   { < span class = "stringliteral" > " Iuml" < / span > , 0x00CF }, { < span class = "stringliteral" > " ETH" < / span > , 0x00D0 },< / div >
< div class = "line" > < a name = "l00077" > < / a > < span class = "lineno" > 77< / span >   { < span class = "stringliteral" > " Ntilde" < / span > , 0x00D1 }, { < span class = "stringliteral" > " Ograve" < / span > , 0x00D2 },< / div >
< div class = "line" > < a name = "l00078" > < / a > < span class = "lineno" > 78< / span >   { < span class = "stringliteral" > " Oacute" < / span > , 0x00D3 }, { < span class = "stringliteral" > " Ocirc" < / span > , 0x00D4 },< / div >
< div class = "line" > < a name = "l00079" > < / a > < span class = "lineno" > 79< / span >   { < span class = "stringliteral" > " Otilde" < / span > , 0x00D5 }, { < span class = "stringliteral" > " Ouml" < / span > , 0x00D6 },< / div >
< div class = "line" > < a name = "l00080" > < / a > < span class = "lineno" > 80< / span >   { < span class = "stringliteral" > " times" < / span > , 0x00D7 }, { < span class = "stringliteral" > " Oslash" < / span > , 0x00D8 },< / div >
< div class = "line" > < a name = "l00081" > < / a > < span class = "lineno" > 81< / span >   { < span class = "stringliteral" > " Ugrave" < / span > , 0x00D9 }, { < span class = "stringliteral" > " Uacute" < / span > , 0x00DA },< / div >
< div class = "line" > < a name = "l00082" > < / a > < span class = "lineno" > 82< / span >   { < span class = "stringliteral" > " Ucirc" < / span > , 0x00DB }, { < span class = "stringliteral" > " Uuml" < / span > , 0x00DC },< / div >
< div class = "line" > < a name = "l00083" > < / a > < span class = "lineno" > 83< / span >   { < span class = "stringliteral" > " Yacute" < / span > , 0x00DD }, { < span class = "stringliteral" > " THORN" < / span > , 0x00DE },< / div >
< div class = "line" > < a name = "l00084" > < / a > < span class = "lineno" > 84< / span >   { < span class = "stringliteral" > " szlig" < / span > , 0x00DF }, { < span class = "stringliteral" > " agrave" < / span > , 0x00E0 },< / div >
< div class = "line" > < a name = "l00085" > < / a > < span class = "lineno" > 85< / span >   { < span class = "stringliteral" > " aacute" < / span > , 0x00E1 }, { < span class = "stringliteral" > " acirc" < / span > , 0x00E2 },< / div >
< div class = "line" > < a name = "l00086" > < / a > < span class = "lineno" > 86< / span >   { < span class = "stringliteral" > " atilde" < / span > , 0x00E3 }, { < span class = "stringliteral" > " auml" < / span > , 0x00E4 },< / div >
< div class = "line" > < a name = "l00087" > < / a > < span class = "lineno" > 87< / span >   { < span class = "stringliteral" > " aring" < / span > , 0x00E5 }, { < span class = "stringliteral" > " aelig" < / span > , 0x00E6 },< / div >
< div class = "line" > < a name = "l00088" > < / a > < span class = "lineno" > 88< / span >   { < span class = "stringliteral" > " ccedil" < / span > , 0x00E7 }, { < span class = "stringliteral" > " egrave" < / span > , 0x00E8 },< / div >
< div class = "line" > < a name = "l00089" > < / a > < span class = "lineno" > 89< / span >   { < span class = "stringliteral" > " eacute" < / span > , 0x00E9 }, { < span class = "stringliteral" > " ecirc" < / span > , 0x00EA },< / div >
< div class = "line" > < a name = "l00090" > < / a > < span class = "lineno" > 90< / span >   { < span class = "stringliteral" > " euml" < / span > , 0x00EB }, { < span class = "stringliteral" > " igrave" < / span > , 0x00EC },< / div >
< div class = "line" > < a name = "l00091" > < / a > < span class = "lineno" > 91< / span >   { < span class = "stringliteral" > " iacute" < / span > , 0x00ED }, { < span class = "stringliteral" > " icirc" < / span > , 0x00EE },< / div >
< div class = "line" > < a name = "l00092" > < / a > < span class = "lineno" > 92< / span >   { < span class = "stringliteral" > " iuml" < / span > , 0x00EF }, { < span class = "stringliteral" > " eth" < / span > , 0x00F0 },< / div >
< div class = "line" > < a name = "l00093" > < / a > < span class = "lineno" > 93< / span >   { < span class = "stringliteral" > " ntilde" < / span > , 0x00F1 }, { < span class = "stringliteral" > " ograve" < / span > , 0x00F2 },< / div >
< div class = "line" > < a name = "l00094" > < / a > < span class = "lineno" > 94< / span >   { < span class = "stringliteral" > " oacute" < / span > , 0x00F3 }, { < span class = "stringliteral" > " ocirc" < / span > , 0x00F4 },< / div >
< div class = "line" > < a name = "l00095" > < / a > < span class = "lineno" > 95< / span >   { < span class = "stringliteral" > " otilde" < / span > , 0x00F5 }, { < span class = "stringliteral" > " ouml" < / span > , 0x00F6 },< / div >
< div class = "line" > < a name = "l00096" > < / a > < span class = "lineno" > 96< / span >   { < span class = "stringliteral" > " divide" < / span > , 0x00F7 }, { < span class = "stringliteral" > " oslash" < / span > , 0x00F8 },< / div >
< div class = "line" > < a name = "l00097" > < / a > < span class = "lineno" > 97< / span >   { < span class = "stringliteral" > " ugrave" < / span > , 0x00F9 }, { < span class = "stringliteral" > " uacute" < / span > , 0x00FA },< / div >
< div class = "line" > < a name = "l00098" > < / a > < span class = "lineno" > 98< / span >   { < span class = "stringliteral" > " ucirc" < / span > , 0x00FB }, { < span class = "stringliteral" > " uuml" < / span > , 0x00FC },< / div >
< div class = "line" > < a name = "l00099" > < / a > < span class = "lineno" > 99< / span >   { < span class = "stringliteral" > " yacute" < / span > , 0x00FD }, { < span class = "stringliteral" > " thorn" < / span > , 0x00FE },< / div >
< div class = "line" > < a name = "l00100" > < / a > < span class = "lineno" > 100< / span >   { < span class = "stringliteral" > " yuml" < / span > , 0x00FF }, { < span class = "stringliteral" > " OElig" < / span > , 0x0152 },< / div >
< div class = "line" > < a name = "l00101" > < / a > < span class = "lineno" > 101< / span >   { < span class = "stringliteral" > " oelig" < / span > , 0x0153 }, { < span class = "stringliteral" > " Scaron" < / span > , 0x0160 },< / div >
< div class = "line" > < a name = "l00102" > < / a > < span class = "lineno" > 102< / span >   { < span class = "stringliteral" > " scaron" < / span > , 0x0161 }, { < span class = "stringliteral" > " Yuml" < / span > , 0x0178 },< / div >
< div class = "line" > < a name = "l00103" > < / a > < span class = "lineno" > 103< / span >   { < span class = "stringliteral" > " fnof" < / span > , 0x0192 }, { < span class = "stringliteral" > " circ" < / span > , 0x02C6 },< / div >
< div class = "line" > < a name = "l00104" > < / a > < span class = "lineno" > 104< / span >   { < span class = "stringliteral" > " tilde" < / span > , 0x02DC }, { < span class = "stringliteral" > " Alpha" < / span > , 0x0391 },< / div >
< div class = "line" > < a name = "l00105" > < / a > < span class = "lineno" > 105< / span >   { < span class = "stringliteral" > " Beta" < / span > , 0x0392 }, { < span class = "stringliteral" > " Gamma" < / span > , 0x0393 },< / div >
< div class = "line" > < a name = "l00106" > < / a > < span class = "lineno" > 106< / span >   { < span class = "stringliteral" > " Delta" < / span > , 0x0394 }, { < span class = "stringliteral" > " Epsilon" < / span > , 0x0395 },< / div >
< div class = "line" > < a name = "l00107" > < / a > < span class = "lineno" > 107< / span >   { < span class = "stringliteral" > " Zeta" < / span > , 0x0396 }, { < span class = "stringliteral" > " Eta" < / span > , 0x0397 },< / div >
< div class = "line" > < a name = "l00108" > < / a > < span class = "lineno" > 108< / span >   { < span class = "stringliteral" > " Theta" < / span > , 0x0398 }, { < span class = "stringliteral" > " Iota" < / span > , 0x0399 },< / div >
< div class = "line" > < a name = "l00109" > < / a > < span class = "lineno" > 109< / span >   { < span class = "stringliteral" > " Kappa" < / span > , 0x039A }, { < span class = "stringliteral" > " Lambda" < / span > , 0x039B },< / div >
< div class = "line" > < a name = "l00110" > < / a > < span class = "lineno" > 110< / span >   { < span class = "stringliteral" > " Mu" < / span > , 0x039C }, { < span class = "stringliteral" > " Nu" < / span > , 0x039D },< / div >
< div class = "line" > < a name = "l00111" > < / a > < span class = "lineno" > 111< / span >   { < span class = "stringliteral" > " Xi" < / span > , 0x039E }, { < span class = "stringliteral" > " Omicron" < / span > , 0x039F },< / div >
< div class = "line" > < a name = "l00112" > < / a > < span class = "lineno" > 112< / span >   { < span class = "stringliteral" > " Pi" < / span > , 0x03A0 }, { < span class = "stringliteral" > " Rho" < / span > , 0x03A1 },< / div >
< div class = "line" > < a name = "l00113" > < / a > < span class = "lineno" > 113< / span >   { < span class = "stringliteral" > " Sigma" < / span > , 0x03A3 }, { < span class = "stringliteral" > " Tau" < / span > , 0x03A4 },< / div >
< div class = "line" > < a name = "l00114" > < / a > < span class = "lineno" > 114< / span >   { < span class = "stringliteral" > " Upsilon" < / span > , 0x03A5 }, { < span class = "stringliteral" > " Phi" < / span > , 0x03A6 },< / div >
< div class = "line" > < a name = "l00115" > < / a > < span class = "lineno" > 115< / span >   { < span class = "stringliteral" > " Chi" < / span > , 0x03A7 }, { < span class = "stringliteral" > " Psi" < / span > , 0x03A8 },< / div >
< div class = "line" > < a name = "l00116" > < / a > < span class = "lineno" > 116< / span >   { < span class = "stringliteral" > " Omega" < / span > , 0x03A9 }, { < span class = "stringliteral" > " alpha" < / span > , 0x03B1 },< / div >
< div class = "line" > < a name = "l00117" > < / a > < span class = "lineno" > 117< / span >   { < span class = "stringliteral" > " beta" < / span > , 0x03B2 }, { < span class = "stringliteral" > " gamma" < / span > , 0x03B3 },< / div >
< div class = "line" > < a name = "l00118" > < / a > < span class = "lineno" > 118< / span >   { < span class = "stringliteral" > " delta" < / span > , 0x03B4 }, { < span class = "stringliteral" > " epsilon" < / span > , 0x03B5 },< / div >
< div class = "line" > < a name = "l00119" > < / a > < span class = "lineno" > 119< / span >   { < span class = "stringliteral" > " zeta" < / span > , 0x03B6 }, { < span class = "stringliteral" > " eta" < / span > , 0x03B7 },< / div >
< div class = "line" > < a name = "l00120" > < / a > < span class = "lineno" > 120< / span >   { < span class = "stringliteral" > " theta" < / span > , 0x03B8 }, { < span class = "stringliteral" > " iota" < / span > , 0x03B9 },< / div >
< div class = "line" > < a name = "l00121" > < / a > < span class = "lineno" > 121< / span >   { < span class = "stringliteral" > " kappa" < / span > , 0x03BA }, { < span class = "stringliteral" > " lambda" < / span > , 0x03BB },< / div >
< div class = "line" > < a name = "l00122" > < / a > < span class = "lineno" > 122< / span >   { < span class = "stringliteral" > " mu" < / span > , 0x03BC }, { < span class = "stringliteral" > " nu" < / span > , 0x03BD },< / div >
< div class = "line" > < a name = "l00123" > < / a > < span class = "lineno" > 123< / span >   { < span class = "stringliteral" > " xi" < / span > , 0x03BE }, { < span class = "stringliteral" > " omicron" < / span > , 0x03BF },< / div >
< div class = "line" > < a name = "l00124" > < / a > < span class = "lineno" > 124< / span >   { < span class = "stringliteral" > " pi" < / span > , 0x03C0 }, { < span class = "stringliteral" > " rho" < / span > , 0x03C1 },< / div >
< div class = "line" > < a name = "l00125" > < / a > < span class = "lineno" > 125< / span >   { < span class = "stringliteral" > " sigmaf" < / span > , 0x03C2 }, { < span class = "stringliteral" > " sigma" < / span > , 0x03C3 },< / div >
< div class = "line" > < a name = "l00126" > < / a > < span class = "lineno" > 126< / span >   { < span class = "stringliteral" > " tau" < / span > , 0x03C4 }, { < span class = "stringliteral" > " upsilon" < / span > , 0x03C5 },< / div >
< div class = "line" > < a name = "l00127" > < / a > < span class = "lineno" > 127< / span >   { < span class = "stringliteral" > " phi" < / span > , 0x03C6 }, { < span class = "stringliteral" > " chi" < / span > , 0x03C7 },< / div >
< div class = "line" > < a name = "l00128" > < / a > < span class = "lineno" > 128< / span >   { < span class = "stringliteral" > " psi" < / span > , 0x03C8 }, { < span class = "stringliteral" > " omega" < / span > , 0x03C9 },< / div >
< div class = "line" > < a name = "l00129" > < / a > < span class = "lineno" > 129< / span >   { < span class = "stringliteral" > " thetasym" < / span > , 0x03D1 }, { < span class = "stringliteral" > " upsih" < / span > , 0x03D2 },< / div >
< div class = "line" > < a name = "l00130" > < / a > < span class = "lineno" > 130< / span >   { < span class = "stringliteral" > " piv" < / span > , 0x03D6 }, { < span class = "stringliteral" > " ensp" < / span > , 0x2002 },< / div >
< div class = "line" > < a name = "l00131" > < / a > < span class = "lineno" > 131< / span >   { < span class = "stringliteral" > " emsp" < / span > , 0x2003 }, { < span class = "stringliteral" > " thinsp" < / span > , 0x2009 },< / div >
< div class = "line" > < a name = "l00132" > < / a > < span class = "lineno" > 132< / span >   { < span class = "stringliteral" > " zwnj" < / span > , 0x200C }, { < span class = "stringliteral" > " zwj" < / span > , 0x200D },< / div >
< div class = "line" > < a name = "l00133" > < / a > < span class = "lineno" > 133< / span >   { < span class = "stringliteral" > " lrm" < / span > , 0x200E }, { < span class = "stringliteral" > " rlm" < / span > , 0x200F },< / div >
< div class = "line" > < a name = "l00134" > < / a > < span class = "lineno" > 134< / span >   { < span class = "stringliteral" > " ndash" < / span > , 0x2013 }, { < span class = "stringliteral" > " mdash" < / span > , 0x2014 },< / div >
< div class = "line" > < a name = "l00135" > < / a > < span class = "lineno" > 135< / span >   { < span class = "stringliteral" > " horbar" < / span > , 0x2015 }, { < span class = "stringliteral" > " lsquo" < / span > , 0x2018 },< / div >
< div class = "line" > < a name = "l00136" > < / a > < span class = "lineno" > 136< / span >   { < span class = "stringliteral" > " rsquo" < / span > , 0x2019 }, { < span class = "stringliteral" > " sbquo" < / span > , 0x201A },< / div >
< div class = "line" > < a name = "l00137" > < / a > < span class = "lineno" > 137< / span >   { < span class = "stringliteral" > " ldquo" < / span > , 0x201C }, { < span class = "stringliteral" > " rdquo" < / span > , 0x201D },< / div >
< div class = "line" > < a name = "l00138" > < / a > < span class = "lineno" > 138< / span >   { < span class = "stringliteral" > " bdquo" < / span > , 0x201E }, { < span class = "stringliteral" > " dagger" < / span > , 0x2020 },< / div >
< div class = "line" > < a name = "l00139" > < / a > < span class = "lineno" > 139< / span >   { < span class = "stringliteral" > " Dagger" < / span > , 0x2021 }, { < span class = "stringliteral" > " bull" < / span > , 0x2022 },< / div >
< div class = "line" > < a name = "l00140" > < / a > < span class = "lineno" > 140< / span >   { < span class = "stringliteral" > " hellip" < / span > , 0x2026 }, { < span class = "stringliteral" > " permil" < / span > , 0x2030 },< / div >
< div class = "line" > < a name = "l00141" > < / a > < span class = "lineno" > 141< / span >   { < span class = "stringliteral" > " prime" < / span > , 0x2032 }, { < span class = "stringliteral" > " Prime" < / span > , 0x2033 },< / div >
< div class = "line" > < a name = "l00142" > < / a > < span class = "lineno" > 142< / span >   { < span class = "stringliteral" > " lsaquo" < / span > , 0x2039 }, { < span class = "stringliteral" > " rsaquo" < / span > , 0x203A },< / div >
< div class = "line" > < a name = "l00143" > < / a > < span class = "lineno" > 143< / span >   { < span class = "stringliteral" > " oline" < / span > , 0x203E }, { < span class = "stringliteral" > " frasl" < / span > , 0x2044 },< / div >
< div class = "line" > < a name = "l00144" > < / a > < span class = "lineno" > 144< / span >   { < span class = "stringliteral" > " euro" < / span > , 0x20AC }, { < span class = "stringliteral" > " image" < / span > , 0x2111 },< / div >
< div class = "line" > < a name = "l00145" > < / a > < span class = "lineno" > 145< / span >   { < span class = "stringliteral" > " weierp" < / span > , 0x2118 }, { < span class = "stringliteral" > " real" < / span > , 0x211C },< / div >
< div class = "line" > < a name = "l00146" > < / a > < span class = "lineno" > 146< / span >   { < span class = "stringliteral" > " trade" < / span > , 0x2122 }, { < span class = "stringliteral" > " alefsym" < / span > , 0x2135 },< / div >
< div class = "line" > < a name = "l00147" > < / a > < span class = "lineno" > 147< / span >   { < span class = "stringliteral" > " larr" < / span > , 0x2190 }, { < span class = "stringliteral" > " uarr" < / span > , 0x2191 },< / div >
< div class = "line" > < a name = "l00148" > < / a > < span class = "lineno" > 148< / span >   { < span class = "stringliteral" > " rarr" < / span > , 0x2192 }, { < span class = "stringliteral" > " darr" < / span > , 0x2193 },< / div >
< div class = "line" > < a name = "l00149" > < / a > < span class = "lineno" > 149< / span >   { < span class = "stringliteral" > " harr" < / span > , 0x2194 }, { < span class = "stringliteral" > " crarr" < / span > , 0x21B5 },< / div >
< div class = "line" > < a name = "l00150" > < / a > < span class = "lineno" > 150< / span >   { < span class = "stringliteral" > " lArr" < / span > , 0x21D0 }, { < span class = "stringliteral" > " uArr" < / span > , 0x21D1 },< / div >
< div class = "line" > < a name = "l00151" > < / a > < span class = "lineno" > 151< / span >   { < span class = "stringliteral" > " rArr" < / span > , 0x21D2 }, { < span class = "stringliteral" > " dArr" < / span > , 0x21D3 },< / div >
< div class = "line" > < a name = "l00152" > < / a > < span class = "lineno" > 152< / span >   { < span class = "stringliteral" > " hArr" < / span > , 0x21D4 }, { < span class = "stringliteral" > " forall" < / span > , 0x2200 },< / div >
< div class = "line" > < a name = "l00153" > < / a > < span class = "lineno" > 153< / span >   { < span class = "stringliteral" > " part" < / span > , 0x2202 }, { < span class = "stringliteral" > " exist" < / span > , 0x2203 },< / div >
< div class = "line" > < a name = "l00154" > < / a > < span class = "lineno" > 154< / span >   { < span class = "stringliteral" > " empty" < / span > , 0x2205 }, { < span class = "stringliteral" > " nabla" < / span > , 0x2207 },< / div >
< div class = "line" > < a name = "l00155" > < / a > < span class = "lineno" > 155< / span >   { < span class = "stringliteral" > " isin" < / span > , 0x2208 }, { < span class = "stringliteral" > " notin" < / span > , 0x2209 },< / div >
< div class = "line" > < a name = "l00156" > < / a > < span class = "lineno" > 156< / span >   { < span class = "stringliteral" > " ni" < / span > , 0x220B }, { < span class = "stringliteral" > " prod" < / span > , 0x220F },< / div >
< div class = "line" > < a name = "l00157" > < / a > < span class = "lineno" > 157< / span >   { < span class = "stringliteral" > " sum" < / span > , 0x2211 }, { < span class = "stringliteral" > " minus" < / span > , 0x2212 },< / div >
< div class = "line" > < a name = "l00158" > < / a > < span class = "lineno" > 158< / span >   { < span class = "stringliteral" > " lowast" < / span > , 0x2217 }, { < span class = "stringliteral" > " radic" < / span > , 0x221A },< / div >
< div class = "line" > < a name = "l00159" > < / a > < span class = "lineno" > 159< / span >   { < span class = "stringliteral" > " prop" < / span > , 0x221D }, { < span class = "stringliteral" > " infin" < / span > , 0x221E },< / div >
< div class = "line" > < a name = "l00160" > < / a > < span class = "lineno" > 160< / span >   { < span class = "stringliteral" > " ang" < / span > , 0x2220 }, { < span class = "stringliteral" > " and" < / span > , 0x2227 },< / div >
< div class = "line" > < a name = "l00161" > < / a > < span class = "lineno" > 161< / span >   { < span class = "stringliteral" > " or" < / span > , 0x2228 }, { < span class = "stringliteral" > " cap" < / span > , 0x2229 },< / div >
< div class = "line" > < a name = "l00162" > < / a > < span class = "lineno" > 162< / span >   { < span class = "stringliteral" > " cup" < / span > , 0x222A }, { < span class = "stringliteral" > " int" < / span > , 0x222B },< / div >
< div class = "line" > < a name = "l00163" > < / a > < span class = "lineno" > 163< / span >   { < span class = "stringliteral" > " there4" < / span > , 0x2234 }, { < span class = "stringliteral" > " sim" < / span > , 0x223C },< / div >
< div class = "line" > < a name = "l00164" > < / a > < span class = "lineno" > 164< / span >   { < span class = "stringliteral" > " cong" < / span > , 0x2245 }, { < span class = "stringliteral" > " asymp" < / span > , 0x2248 },< / div >
< div class = "line" > < a name = "l00165" > < / a > < span class = "lineno" > 165< / span >   { < span class = "stringliteral" > " ne" < / span > , 0x2260 }, { < span class = "stringliteral" > " equiv" < / span > , 0x2261 },< / div >
< div class = "line" > < a name = "l00166" > < / a > < span class = "lineno" > 166< / span >   { < span class = "stringliteral" > " le" < / span > , 0x2264 }, { < span class = "stringliteral" > " ge" < / span > , 0x2265 },< / div >
< div class = "line" > < a name = "l00167" > < / a > < span class = "lineno" > 167< / span >   { < span class = "stringliteral" > " sub" < / span > , 0x2282 }, { < span class = "stringliteral" > " sup" < / span > , 0x2283 },< / div >
< div class = "line" > < a name = "l00168" > < / a > < span class = "lineno" > 168< / span >   { < span class = "stringliteral" > " nsub" < / span > , 0x2284 }, { < span class = "stringliteral" > " sube" < / span > , 0x2286 },< / div >
< div class = "line" > < a name = "l00169" > < / a > < span class = "lineno" > 169< / span >   { < span class = "stringliteral" > " supe" < / span > , 0x2287 }, { < span class = "stringliteral" > " oplus" < / span > , 0x2295 },< / div >
< div class = "line" > < a name = "l00170" > < / a > < span class = "lineno" > 170< / span >   { < span class = "stringliteral" > " otimes" < / span > , 0x2297 }, { < span class = "stringliteral" > " perp" < / span > , 0x22A5 },< / div >
< div class = "line" > < a name = "l00171" > < / a > < span class = "lineno" > 171< / span >   { < span class = "stringliteral" > " sdot" < / span > , 0x22C5 }, { < span class = "stringliteral" > " lceil" < / span > , 0x2308 },< / div >
< div class = "line" > < a name = "l00172" > < / a > < span class = "lineno" > 172< / span >   { < span class = "stringliteral" > " rceil" < / span > , 0x2309 }, { < span class = "stringliteral" > " lfloor" < / span > , 0x230A },< / div >
< div class = "line" > < a name = "l00173" > < / a > < span class = "lineno" > 173< / span >   { < span class = "stringliteral" > " rfloor" < / span > , 0x230B }, { < span class = "stringliteral" > " lang" < / span > , 0x2329 },< / div >
< div class = "line" > < a name = "l00174" > < / a > < span class = "lineno" > 174< / span >   { < span class = "stringliteral" > " rang" < / span > , 0x232A }, { < span class = "stringliteral" > " loz" < / span > , 0x25CA },< / div >
< div class = "line" > < a name = "l00175" > < / a > < span class = "lineno" > 175< / span >   { < span class = "stringliteral" > " spades" < / span > , 0x2660 }, { < span class = "stringliteral" > " clubs" < / span > , 0x2663 },< / div >
< div class = "line" > < a name = "l00176" > < / a > < span class = "lineno" > 176< / span >   { < span class = "stringliteral" > " hearts" < / span > , 0x2665 }, { < span class = "stringliteral" > " diams" < / span > , 0x2666 }< / div >
< div class = "line" > < a name = "l00177" > < / a > < span class = "lineno" > 177< / span >   };< / div >
< div class = "line" > < a name = "l00178" > < / a > < span class = "lineno" > 178< / span >   < / div >
< div class = "line" > < a name = "l00179" > < / a > < span class = "lineno" > 179< / span >   < span class = "comment" > // Used to convert number to utf-8 char.< / span > < / div >
< div class = "line" > < a name = "l00180" > < / a > < span class = "lineno" > 180< / span >   wstring_convert< codecvt_utf8< char32_t> , char32_t> u8c;< / div >
< div class = "line" > < a name = "l00181" > < / a > < span class = "lineno" > 181< / span >   < span class = "comment" > // Matches numbered entities between 1 and 8 digits, decimal or hexadecimal,< / span > < / div >
< div class = "line" > < a name = "l00182" > < / a > < span class = "lineno" > 182< / span >   < span class = "comment" > // or named entities.< / span > < / div >
< div class = "line" > < a name = "l00183" > < / a > < span class = "lineno" > 183< / span >   < span class = "keyword" > const< / span > regex re_entity{< span class = "stringliteral" > " & (#(x)?([[:alnum:]]{1,8})" < / span > < / div >
< div class = "line" > < a name = "l00184" > < / a > < span class = "lineno" > 184< / span >   < span class = "stringliteral" > " |[^;[:space:][:punct:]]+);" < / span > };< / div >
< div class = "line" > < a name = "l00185" > < / a > < span class = "lineno" > 185< / span >   smatch match;< / div >
< div class = "line" > < a name = "l00186" > < / a > < span class = "lineno" > 186< / span >   < / div >
< div class = "line" > < a name = "l00187" > < / a > < span class = "lineno" > 187< / span >   < span class = "keywordflow" > while< / span > (regex_search(buffer, match, re_entity))< / div >
< div class = "line" > < a name = "l00188" > < / a > < span class = "lineno" > 188< / span >   {< / div >
< div class = "line" > < a name = "l00189" > < / a > < span class = "lineno" > 189< / span >   output += match.prefix().str();< / div >
< div class = "line" > < a name = "l00190" > < / a > < span class = "lineno" > 190< / span >   < span class = "keywordflow" > try< / span > < / div >
< div class = "line" > < a name = "l00191" > < / a > < span class = "lineno" > 191< / span >   {< / div >
< div class = "line" > < a name = "l00192" > < / a > < span class = "lineno" > 192< / span >   < span class = "keyword" > const< / span > char32_t codepoint{[& match, & names]< / div >
< div class = "line" > < a name = "l00193" > < / a > < span class = "lineno" > 193< / span >   {< / div >
< div class = "line" > < a name = "l00194" > < / a > < span class = "lineno" > 194< / span >   < span class = "comment" > // If it doesn' t start with a ' #' it is a named entity.< / span > < / div >
< div class = "line" > < a name = "l00195" > < / a > < span class = "lineno" > 195< / span >   < span class = "keywordflow" > if< / span > (match[1].str()[0] != < span class = "charliteral" > ' #' < / span > )< / div >
< div class = "line" > < a name = "l00196" > < / a > < span class = "lineno" > 196< / span >   {< / div >
< div class = "line" > < a name = "l00197" > < / a > < span class = "lineno" > 197< / span >   < span class = "keywordflow" > return< / span > names.at(match[1].str());< / div >
< div class = "line" > < a name = "l00198" > < / a > < span class = "lineno" > 198< / span >   }< / div >
< div class = "line" > < a name = "l00199" > < / a > < span class = "lineno" > 199< / span >   < span class = "comment" > // ' x' after ' #' means the number is hexadecimal.< / span > < / div >
< div class = "line" > < a name = "l00200" > < / a > < span class = "lineno" > 200< / span >   < span class = "keywordflow" > if< / span > (match[2].length() == 1)< / div >
< div class = "line" > < a name = "l00201" > < / a > < span class = "lineno" > 201< / span >   {< / div >
2020-11-13 13:39:58 +01:00
< div class = "line" > < a name = "l00202" > < / a > < span class = "lineno" > 202< / span >   < span class = "keywordflow" > return< / span > < span class = "keyword" > static_cast< < / span > char32_t< span class = "keyword" > > < / span > (stoul(match[3].str(),< / div >
2020-03-12 12:26:31 +01:00
< div class = "line" > < a name = "l00203" > < / a > < span class = "lineno" > 203< / span >   < span class = "keyword" > nullptr< / span > , 16));< / div >
< div class = "line" > < a name = "l00204" > < / a > < span class = "lineno" > 204< / span >   }< / div >
< div class = "line" > < a name = "l00205" > < / a > < span class = "lineno" > 205< / span >   < span class = "comment" > // ' #' without ' x' means the number is decimal.< / span > < / div >
2020-11-13 13:39:58 +01:00
< div class = "line" > < a name = "l00206" > < / a > < span class = "lineno" > 206< / span >   < span class = "keywordflow" > return< / span > < span class = "keyword" > static_cast< < / span > char32_t< span class = "keyword" > > < / span > (stoul(match[3].str(),< / div >
2020-03-12 12:26:31 +01:00
< div class = "line" > < a name = "l00207" > < / a > < span class = "lineno" > 207< / span >   < span class = "keyword" > nullptr< / span > , 10));< / div >
< div class = "line" > < a name = "l00208" > < / a > < span class = "lineno" > 208< / span >   }()};< / div >
< div class = "line" > < a name = "l00209" > < / a > < span class = "lineno" > 209< / span >   output += u8c.to_bytes(codepoint);< / div >
< div class = "line" > < a name = "l00210" > < / a > < span class = "lineno" > 210< / span >   }< / div >
< div class = "line" > < a name = "l00211" > < / a > < span class = "lineno" > 211< / span >   < span class = "keywordflow" > catch< / span > (< span class = "keyword" > const< / span > std::out_of_range & ) < span class = "comment" > // Named entity could not be found.< / span > < / div >
< div class = "line" > < a name = "l00212" > < / a > < span class = "lineno" > 212< / span >   {< / div >
< div class = "line" > < a name = "l00213" > < / a > < span class = "lineno" > 213< / span >   output += match.str();< / div >
< div class = "line" > < a name = "l00214" > < / a > < span class = "lineno" > 214< / span >   }< / div >
< div class = "line" > < a name = "l00215" > < / a > < span class = "lineno" > 215< / span >   buffer = match.suffix().str();< / div >
< div class = "line" > < a name = "l00216" > < / a > < span class = "lineno" > 216< / span >   }< / div >
< div class = "line" > < a name = "l00217" > < / a > < span class = "lineno" > 217< / span >   output += buffer;< / div >
< div class = "line" > < a name = "l00218" > < / a > < span class = "lineno" > 218< / span >   < / div >
< div class = "line" > < a name = "l00219" > < / a > < span class = "lineno" > 219< / span >   < span class = "keywordflow" > return< / span > output;< / div >
< div class = "line" > < a name = "l00220" > < / a > < span class = "lineno" > 220< / span >   }< / div >
2020-01-16 18:34:50 +01:00
< / div > <!-- fragment -->
< / div >
< / div >
2020-01-03 12:47:36 +01:00
< / div > <!-- contents -->
2020-01-16 19:21:38 +01:00
< div class = "ttc" id = "anamespacemastodonpp_html_af8b3b89118adeccc71c54dfd36c987f6" > < div class = "ttname" > < a href = "namespacemastodonpp.html#af8b3b89118adeccc71c54dfd36c987f6" > mastodonpp::parametermap< / a > < / div > < div class = "ttdeci" > map< string_view, variant< string_view, vector< string_view > > > parametermap< / div > < div class = "ttdoc" > std::map of parameters for API calls.< / div > < div class = "ttdef" > < b > Definition:< / b > types.hpp:64< / div > < / div >
2020-02-03 07:58:41 +01:00
< div class = "ttc" id = "anamespacemastodonpp_html_a4e42b93c60074920fb731ab6ba797935" > < div class = "ttname" > < a href = "namespacemastodonpp.html#a4e42b93c60074920fb731ab6ba797935" > mastodonpp::unescape_html< / a > < / div > < div class = "ttdeci" > string unescape_html(string html)< / div > < div class = "ttdoc" > Replaces HTML entities with UTF-8 characters.< / div > < div class = "ttdef" > < b > Definition:< / b > helpers.cpp:39< / div > < / div >
2020-01-03 12:47:36 +01:00
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
Generated by   < a href = "http://www.doxygen.org/index.html" >
< img class = "footer" src = "doxygen.png" alt = "doxygen" / >
2020-11-13 13:39:58 +01:00
< / a > 1.8.17
2020-01-03 12:47:36 +01:00
< / small > < / address >
< / body >
< / html >