25 #include <string_view>
46 {
return str.find(
'$') != std::string::npos; }
114 const char* singular,
128 #define VGETTEXT(msgid, ...) \
129 vgettext_impl(GETTEXT_DOMAIN, msgid, __VA_ARGS__)
131 #define VNGETTEXT(msgid, msgid_plural, count, ...) \
132 vngettext_impl(GETTEXT_DOMAIN, msgid, msgid_plural, count, __VA_ARGS__)
144 [[nodiscard]] std::size_t
edit_distance_approx(std::string_view str_1, std::string_view str_2) noexcept;
std::string(* evaluate_formula)(const std::string &formula)
std::string 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 ...
std::string format_timespan(std::time_t time, bool detailed)
Formats a timespan into human-readable text for player authentication functions.
t_string interpolate_variables_into_tstring(const t_string &tstr, const variable_set &variables)
Function that does the same as the above, for t_stringS.
std::string format_disjunct_list(const t_string &empty, const std::vector< t_string > &elems)
Format a disjunctive list.
bool might_contain_variables(const std::string &str)
Determines if a string might contain variables to interpolate.
std::string format_conjunct_list(const t_string &empty, const std::vector< t_string > &elems)
Format a conjunctive list.
std::map< std::string, t_string > string_map