The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Macros | Functions
string_utils.hpp File Reference
#include "serialization/string_utils.hpp"
Include dependency graph for string_utils.hpp:

Go to the source code of this file.

Namespaces

 utils
 

Macros

#define VGETTEXT(msgid,...)   vgettext(msgid, __VA_ARGS__)
 
#define VNGETTEXT(msgid, msgid_plural, count,...)   vngettext(msgid, msgid_plural, count, __VA_ARGS__)
 

Functions

bool utils::might_contain_variables (const std::string &str)
 Determines if a string might contain variables to interpolate. More...
 
std::string utils::interpolate_variables_into_string (const std::string &str, const string_map *const symbols)
 Function which will interpolate variables, starting with '$' in the string 'str' with the equivalent symbols in the given symbol table. More...
 
std::string utils::interpolate_variables_into_string (const std::string &str, const std::map< std::string, std::string > *const symbols)
 
std::string utils::interpolate_variables_into_string (const std::string &str, const variable_set &variables)
 
t_string utils::interpolate_variables_into_tstring (const t_string &str, const variable_set &variables)
 Function that does the same as the above, for t_stringS. More...
 
std::string utils::format_conjunct_list (const t_string &empty, const std::vector< t_string > &elems)
 Format a conjunctive list. More...
 
std::string utils::format_disjunct_list (const t_string &empty, const std::vector< t_string > &elems)
 Format a disjunctive list. More...
 
std::string vgettext (const char *msgid, const utils::string_map &symbols)
 Handy wrappers around interpolate_variables_into_string and gettext. More...
 
std::string vgettext (const char *domain, const char *msgid, const utils::string_map &symbols)
 
std::string vngettext (const char *, const char *, int, const utils::string_map &)
 
std::string vngettext (const char *, const char *, const char *, int, const utils::string_map &)
 

Macro Definition Documentation

#define VGETTEXT (   msgid,
  ... 
)    vgettext(msgid, __VA_ARGS__)
#define VNGETTEXT (   msgid,
  msgid_plural,
  count,
  ... 
)    vngettext(msgid, msgid_plural, count, __VA_ARGS__)

Function Documentation

std::string vgettext ( const char *  msgid,
const utils::string_map symbols 
)

Handy wrappers around interpolate_variables_into_string and gettext.

std::string vgettext ( const char *  domain,
const char *  msgid,
const utils::string_map symbols 
)
std::string vngettext ( const char *  ,
const char *  ,
int  ,
const utils::string_map  
)
std::string vngettext ( const char *  ,
const char *  ,
const char *  ,
int  ,
const utils::string_map  
)