Namespace

text

On this page

Classes 1

  • text::ConsoleCommentsThe HTML comments of a Markdown text, invisible on GitHub, read line by line (each trimmed of white space, as trim_space): skipped, except the console's own (an app's changelog…

Functions 12

std::string trim_space(const std::string &s)

s without the white space (std::isspace in the C locale: space, \t, \n, \v, \f, \r) at either end.

text.hpp:17
std::string trim_space_end(std::string s)

s without the white space (as trim_space) at its end; its start as it is.

text.hpp:27
std::string trim_blank(const std::string &s)

s without the spaces and tabs at either end (what Markdown calls blank); line ends stay.

text.hpp:36
std::string lower_ascii(std::string s)

A..Z as a..z, every other byte as it is.

text.hpp:45
std::string capitalise_ascii(std::string s)

The first byte a..z as A..Z ("play time" -> "Play time"); a text that starts with anything else (a digit, a UTF-8 character) as it is.

text.hpp:55
bool starts_with(const std::string &s, const char *prefix)
bool starts_with(const std::string &s, const std::string &prefix)
bool ends_with(const std::string &s, const std::string &suffix)
std::vector< std::string > lines(const std::string &s)

The lines of s, split at each \n, a \r before it dropped (CRLF read as LF). The empty ones too: a text that ends with \n ends with an empty line, and "" is one empty line.

text.hpp:80
std::string short_url(const std::string &url)

"https://ko-fi.com/jigsawfr" -> "ko-fi.com/jigsawfr": what to type by hand. A text without a scheme as it is.

text.hpp:98
std::string url_encode(const std::string &s)

s percent-encoded (RFC 3986) for a URL's query: the unreserved characters (A..Z, a..z, 0..9, -_.~) as they are, every other byte as XX ("a b/é" -> "a%20b%2F%C3%A9").

text.hpp:107
std::string join(const std::vector< std::string > &parts,const std::string &sep)

The parts one after the other, sep between two of them: {"a", "b"} with "\n" -> "a\nb"; none -> "".

text.hpp:129

Read from Aurore's headers by Doxygen at each build · library/include