#include <format.h>
Public Types | |
typedef std::vector< fs_op > | oplist |
Public Member Functions | |
formatted_string (int init_colour=0) | |
formatted_string (const std::string &s, int init_colour=0) | |
operator std::string () const | |
void | display (int start=0, int end=-1) const |
std::string | tostring (int start=0, int end=-1) const |
std::string | to_colour_string () const |
void | cprintf (const char *s,...) |
void | cprintf (const std::string &s) |
void | add_glyph (glyph g) |
void | textcolor (int color) |
formatted_string | substr (size_t index, size_t length=std::string::npos) const |
void | all_caps () |
void | clear () |
bool | empty () |
void | swap (formatted_string &other) |
std::string::size_type | length () const |
std::string | html_dump () const |
bool | operator< (const formatted_string &other) const |
const formatted_string & | operator+= (const formatted_string &other) |
char & | operator[] (size_t idx) |
Static Public Member Functions | |
static formatted_string | parse_string (const std::string &s, bool eot_ends_format=true, bool(*process_tag)(const std::string &tag)=NULL, int main_colour=LIGHTGREY) |
static void | parse_string_to_multiple (const std::string &s, std::vector< formatted_string > &out) |
static int | get_colour (const std::string &tag) |
Public Attributes | |
oplist | ops |
Classes | |
struct | fs_op |
typedef std::vector<fs_op> formatted_string::oplist |
formatted_string::formatted_string | ( | int | init_colour = 0 |
) |
formatted_string::formatted_string | ( | const std::string & | s, | |
int | init_colour = 0 | |||
) | [explicit] |
formatted_string::operator std::string | ( | ) | const |
void formatted_string::display | ( | int | start = 0 , |
|
int | end = -1 | |||
) | const |
std::string formatted_string::tostring | ( | int | start = 0 , |
|
int | end = -1 | |||
) | const |
std::string formatted_string::to_colour_string | ( | ) | const |
void formatted_string::cprintf | ( | const char * | s, | |
... | ||||
) |
void formatted_string::cprintf | ( | const std::string & | s | ) |
void formatted_string::add_glyph | ( | glyph | g | ) |
void formatted_string::textcolor | ( | int | color | ) |
formatted_string formatted_string::substr | ( | size_t | index, | |
size_t | length = std::string::npos | |||
) | const |
void formatted_string::all_caps | ( | ) |
void formatted_string::clear | ( | ) |
bool formatted_string::empty | ( | ) |
void formatted_string::swap | ( | formatted_string & | other | ) |
std::string::size_type formatted_string::length | ( | ) | const |
std::string formatted_string::html_dump | ( | ) | const |
bool formatted_string::operator< | ( | const formatted_string & | other | ) | const |
const formatted_string & formatted_string::operator+= | ( | const formatted_string & | other | ) |
char & formatted_string::operator[] | ( | size_t | idx | ) |
formatted_string formatted_string::parse_string | ( | const std::string & | s, | |
bool | eot_ends_format = true , |
|||
bool(*)(const std::string &tag) | process_tag = NULL , |
|||
int | main_colour = LIGHTGREY | |||
) | [static] |
void formatted_string::parse_string_to_multiple | ( | const std::string & | s, | |
std::vector< formatted_string > & | out | |||
) | [static] |
int formatted_string::get_colour | ( | const std::string & | tag | ) | [static] |