#include "defines.h"
#include "enum.h"
#include <cctype>
#include <string>
#include <vector>
#include <map>
Go to the source code of this file.
#define CASE_ESCAPE case ESCAPE: case CONTROL('G'): case -1: |
#define TAG_UNFOUND -20404 |
std::string apostrophise | ( | const std::string & | name | ) |
std::string apostrophise_fixup | ( | const std::string & | msg | ) |
std::string apply_description | ( | description_level_type | desc, | |
const std::string & | name, | |||
int | quantity = 1 , |
|||
bool | num_in_words = false | |||
) |
std::string article_a | ( | const std::string & | name, | |
bool | lowercase = true | |||
) |
coord_def cgetpos | ( | GotoRegion | region = GOTO_CRT |
) |
coord_def cgetsize | ( | GotoRegion | region = GOTO_CRT |
) |
coord_def cgettopleft | ( | GotoRegion | region = GOTO_CRT |
) |
void cgotoxy | ( | int | x, | |
int | y, | |||
GotoRegion | region = GOTO_CRT | |||
) |
std::string comma_separated_line | ( | Z | start, | |
Z | end, | |||
const std::string & | andc = " and " , |
|||
const std::string & | comma = ", " | |||
) | [inline] |
int count_occurrences | ( | const std::string & | text, | |
const std::string & | searchfor | |||
) |
void cscroll | ( | int | n, | |
GotoRegion | region | |||
) |
description_level_type description_type_by_name | ( | const char * | desc | ) |
int ends_with | ( | const std::string & | s, | |
const char * | suffixes[] | |||
) |
Returns 1 + the index of the first suffix that matches the given string, 0 if no suffixes match.
bool ends_with | ( | const std::string & | s, | |
const std::string & | suffix | |||
) | [inline] |
std::string& escape_path_spaces | ( | std::string & | s | ) |
GotoRegion get_cursor_region | ( | ) |
bool key_is_escape | ( | int | key | ) |
std::string& lowercase | ( | std::string & | s | ) |
std::string lowercase_first | ( | std::string | s | ) | [inline] |
std::string lowercase_string | ( | std::string | s | ) |
std::string make_stringf | ( | const char * | format, | |
... | ||||
) |
std::string number_in_words | ( | unsigned | number, | |
int | pow = 0 | |||
) |
std::string number_to_string | ( | unsigned | number, | |
bool | in_words = false | |||
) |
void play_sound | ( | const char * | file | ) |
std::string pluralise | ( | const std::string & | name, | |
const char * | stock_plural_quals[] = standard_plural_qualifiers , |
|||
const char * | no_of[] = NULL | |||
) |
std::string replace_all | ( | std::string | s, | |
const std::string & | tofind, | |||
const std::string & | replacement | |||
) |
std::string replace_all_of | ( | std::string | s, | |
const std::string & | tofind, | |||
const std::string & | replacement | |||
) |
bool shell_safe | ( | const char * | file | ) |
std::vector<std::string> split_string | ( | const std::string & | sep, | |
std::string | s, | |||
bool | trim = true , |
|||
bool | accept_empties = false , |
|||
int | nsplits = -1 | |||
) |
bool starts_with | ( | const std::string & | s, | |
const std::string & | prefix | |||
) | [inline] |
bool strip_bool_tag | ( | std::string & | s, | |
const std::string & | name, | |||
bool | defval = false | |||
) |
std::string strip_filename_unsafe_chars | ( | const std::string & | s | ) |
int strip_number_tag | ( | std::string & | s, | |
const std::string & | tagprefix | |||
) |
bool strip_suffix | ( | std::string & | s, | |
const std::string & | suffix | |||
) |
bool strip_tag | ( | std::string & | s, | |
const std::string & | tag, | |||
bool | nopad = false | |||
) |
std::string strip_tag_prefix | ( | std::string & | s, | |
const std::string & | tagprefix | |||
) |
size_t strlcpy | ( | char * | dst, | |
const char * | src, | |||
size_t | n | |||
) |
int strwidth | ( | const std::string & | s | ) |
int strwidth | ( | const char * | s | ) |
std::string& trim_string | ( | std::string & | str | ) |
std::string& trim_string_right | ( | std::string & | str | ) |
std::string trimmed_string | ( | std::string | s | ) |
std::string upcase_first | ( | std::string | ) |
std::string& uppercase | ( | std::string & | s | ) |
std::string uppercase_first | ( | std::string | s | ) | [inline] |
std::string vmake_stringf | ( | const char * | format, | |
va_list | args | |||
) |
void wait_for_keypress | ( | ) |
const char* standard_plural_qualifiers[] |