AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
StringFormat.h File Reference
#include "Define.h"
#include <fmt/chrono.h>
#include <fmt/format.h>
#include <fmt/printf.h>
#include <locale>

Go to the source code of this file.

Namespaces

namespace  Acore
 
namespace  Acore::String
 

Typedefs

template<typename... Args>
using Acore::FormatString = fmt::format_string< Args... >
 

Functions

template<typename... Args>
std::string Acore::StringFormat (FormatString< Args... > fmt, Args &&... args)
 Default AC string format function. More...
 
bool Acore::IsFormatEmptyOrNull (char const *fmt)
 Returns true if the given char pointer is null. More...
 
bool Acore::IsFormatEmptyOrNull (std::string_view fmt)
 Returns true if the given std::string is empty. More...
 
template<class Str >
AC_COMMON_API Str Acore::String::Trim (const Str &s, const std::locale &loc=std::locale())
 
AC_COMMON_API std::string Acore::String::TrimRightInPlace (std::string &str)
 
AC_COMMON_API std::string Acore::String::AddSuffixIfNotExists (std::string str, const char suffix)
 Util function to add a suffix char. Can be used to add a slash at the end of a path. More...
 
template<typename T , FMT_ENABLE_IF(std::is_enum_v< T >) >
auto format_as (T f)
 

Function Documentation

◆ format_as()

template<typename T , FMT_ENABLE_IF(std::is_enum_v< T >) >
auto format_as ( f)
72{ return fmt::underlying(f); }