![]() |
TrinityCore
|
#include "Util.h"#include "Common.h"#include "Containers.h"#include "IpAddress.h"#include "StringConvert.h"#include "StringFormat.h"#include <utf8.h>#include <algorithm>#include <iomanip>#include <sstream>#include <string>#include <cctype>#include <cstdarg>#include <ctime>#include <boost/core/demangle.hpp>
Include dependency graph for Util.cpp:Go to the source code of this file.
Functions | |
| tm | TimeBreakdown (time_t time) |
| time_t | GetLocalHourTimestamp (time_t time, uint8 hour, bool onlyAfterTime) |
| std::string | secsToTimeString (uint64 timeInSecs, TimeFormat timeFormat, bool hoursOnly) |
| Optional< int32 > | MoneyStringToMoney (std::string const &moneyString) |
| uint32 | TimeStringToSecs (std::string const ×tring) |
| std::string | TimeToTimestampStr (time_t t) |
| std::string | TimeToHumanReadable (time_t t) |
| bool | IsIPAddress (char const *ipaddress) |
| Check if the string is a valid ip address representation. | |
| uint32 | CreatePIDFile (std::string const &filename) |
| create PID file | |
| uint32 | GetPID () |
| size_t | utf8length (std::string &utf8str) |
| void | utf8truncate (std::string &utf8str, size_t len) |
| bool | Utf8toWStr (char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize) |
| bool | Utf8toWStr (std::string_view utf8str, std::wstring &wstr) |
| bool | WStrToUtf8 (wchar_t const *wstr, size_t size, std::string &utf8str) |
| bool | WStrToUtf8 (std::wstring_view wstr, std::string &utf8str) |
| void | wstrToUpper (std::wstring &str) |
| void | wstrToLower (std::wstring &str) |
| void | strToUpper (std::string &str) |
| void | strToLower (std::string &str) |
| std::wstring | GetMainPartOfName (std::wstring const &wname, uint32 declension) |
| bool | utf8ToConsole (std::string_view utf8str, std::string &conStr) |
| bool | consoleToUtf8 (std::string_view conStr, std::string &utf8str) |
| bool | Utf8FitTo (std::string_view str, std::wstring_view search) |
| void | utf8printf (FILE *out, const char *str,...) |
| void | vutf8printf (FILE *out, const char *str, va_list *ap) |
| bool | Utf8ToUpperOnlyLatin (std::string &utf8String) |
| bool | ReadWinConsole (std::string &str, size_t size) |
| bool | WriteWinConsole (std::string_view str, bool error) |
| TC_COMMON_API Optional< std::size_t > | RemoveCRLF (std::string &str) |
| bool | StringEqualI (std::string_view a, std::string_view b) |
| bool | StringContainsStringI (std::string_view haystack, std::string_view needle) |
| bool | StringCompareLessI (std::string_view a, std::string_view b) |
| bool consoleToUtf8 | ( | std::string_view | conStr, |
| std::string & | utf8str | ||
| ) |
| uint32 CreatePIDFile | ( | std::string const & | filename | ) |
| time_t GetLocalHourTimestamp | ( | time_t | time, |
| uint8 | hour, | ||
| bool | onlyAfterTime | ||
| ) |
| std::wstring GetMainPartOfName | ( | std::wstring const & | wname, |
| uint32 | declension | ||
| ) |
| uint32 GetPID | ( | ) |
| bool IsIPAddress | ( | char const * | ipaddress | ) |
| bool ReadWinConsole | ( | std::string & | str, |
| size_t | size | ||
| ) |
| TC_COMMON_API Optional< std::size_t > RemoveCRLF | ( | std::string & | str | ) |
| std::string secsToTimeString | ( | uint64 | timeInSecs, |
| TimeFormat | timeFormat, | ||
| bool | hoursOnly | ||
| ) |
| bool StringCompareLessI | ( | std::string_view | a, |
| std::string_view | b | ||
| ) |
| bool StringContainsStringI | ( | std::string_view | haystack, |
| std::string_view | needle | ||
| ) |
| bool StringEqualI | ( | std::string_view | a, |
| std::string_view | b | ||
| ) |
| void strToLower | ( | std::string & | str | ) |
| tm TimeBreakdown | ( | time_t | time | ) |
| uint32 TimeStringToSecs | ( | std::string const & | timestring | ) |
| std::string TimeToHumanReadable | ( | time_t | t | ) |
| std::string TimeToTimestampStr | ( | time_t | t | ) |
| bool Utf8FitTo | ( | std::string_view | str, |
| std::wstring_view | search | ||
| ) |
| size_t utf8length | ( | std::string & | utf8str | ) |
| void utf8printf | ( | FILE * | out, |
| const char * | str, | ||
| ... | |||
| ) |
| bool utf8ToConsole | ( | std::string_view | utf8str, |
| std::string & | conStr | ||
| ) |
| bool Utf8ToUpperOnlyLatin | ( | std::string & | utf8String | ) |
| bool Utf8toWStr | ( | char const * | utf8str, |
| size_t | csize, | ||
| wchar_t * | wstr, | ||
| size_t & | wsize | ||
| ) |
| bool Utf8toWStr | ( | std::string_view | utf8str, |
| std::wstring & | wstr | ||
| ) |
| void utf8truncate | ( | std::string & | utf8str, |
| size_t | len | ||
| ) |
| void vutf8printf | ( | FILE * | out, |
| const char * | str, | ||
| va_list * | ap | ||
| ) |
| bool WriteWinConsole | ( | std::string_view | str, |
| bool | error | ||
| ) |
| void wstrToLower | ( | std::wstring & | str | ) |
| bool WStrToUtf8 | ( | std::wstring_view | wstr, |
| std::string & | utf8str | ||
| ) |