AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Containers.h"
#include "Define.h"
#include "Errors.h"
#include "Optional.h"
#include <algorithm>
#include <array>
#include <cctype>
#include <list>
#include <map>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
struct | Finder< T, S > |
struct | StringCompareLessI_T |
class | HookList< T > |
class | flag96 |
Namespaces | |
namespace | Acore |
namespace | Acore::Impl |
Enumerations | |
enum | ComparisionType { COMP_TYPE_EQ = 0 , COMP_TYPE_HIGH , COMP_TYPE_LOW , COMP_TYPE_HIGH_EQ , COMP_TYPE_LOW_EQ , COMP_TYPE_MAX } |
Functions | |
void | stripLineInvisibleChars (std::string &src) |
AC_COMMON_API Optional< int32 > | MoneyStringToMoney (std::string_view moneyString) |
std::string | secsToTimeString (uint64 timeInSecs, bool shortText=false) |
uint32 | TimeStringToSecs (const std::string ×tring) |
void | ApplyPercentModFloatVar (float &var, float val, bool apply) |
template<class T , class U > | |
T | CalculatePct (T base, U pct) |
template<class T , class U > | |
T | AddPct (T &base, U pct) |
template<class T , class U > | |
T | ApplyPct (T &base, U pct) |
template<class T > | |
T | RoundToInterval (T &num, T floor, T ceil) |
AC_COMMON_API bool | Utf8toWStr (std::string_view utf8str, std::wstring &wstr) |
AC_COMMON_API bool | Utf8toWStr (char const *utf8str, std::size_t csize, wchar_t *wstr, std::size_t &wsize) |
bool | Utf8toWStr (std::string_view utf8str, wchar_t *wstr, std::size_t &wsize) |
AC_COMMON_API bool | WStrToUtf8 (std::wstring_view wstr, std::string &utf8str) |
AC_COMMON_API bool | WStrToUtf8 (wchar_t const *wstr, std::size_t size, std::string &utf8str) |
std::size_t | utf8length (std::string &utf8str) |
void | utf8truncate (std::string &utf8str, std::size_t len) |
bool | isBasicLatinCharacter (wchar_t wchar) |
bool | isExtendedLatinCharacter (wchar_t wchar) |
bool | isCyrillicCharacter (wchar_t wchar) |
bool | isEastAsianCharacter (wchar_t wchar) |
bool | isNumeric (wchar_t wchar) |
bool | isNumeric (char c) |
bool | IsEvenNumber (int32 n) |
bool | isNumeric (char const *str) |
bool | isNumericOrSpace (wchar_t wchar) |
bool | isBasicLatinString (std::wstring_view wstr, bool numericOrSpace) |
bool | isExtendedLatinString (std::wstring_view wstr, bool numericOrSpace) |
bool | isCyrillicString (std::wstring_view wstr, bool numericOrSpace) |
bool | isEastAsianString (std::wstring_view wstr, bool numericOrSpace) |
char | charToUpper (char c) |
char | charToLower (char c) |
wchar_t | wcharToUpper (wchar_t wchar) |
wchar_t | wcharToUpperOnlyLatin (wchar_t wchar) |
wchar_t | wcharToLower (wchar_t wchar) |
void | wstrToUpper (std::wstring &str) |
void | wstrToLower (std::wstring &str) |
std::wstring | GetMainPartOfName (std::wstring const &wname, uint32 declension) |
AC_COMMON_API bool | utf8ToConsole (std::string_view utf8str, std::string &conStr) |
AC_COMMON_API bool | consoleToUtf8 (std::string_view conStr, std::string &utf8str) |
AC_COMMON_API bool | Utf8FitTo (std::string_view str, std::wstring_view search) |
AC_COMMON_API void | utf8printf (FILE *out, const char *str,...) |
AC_COMMON_API void | vutf8printf (FILE *out, const char *str, va_list *ap) |
AC_COMMON_API bool | Utf8ToUpperOnlyLatin (std::string &utf8String) |
bool | IsIPAddress (char const *ipaddress) |
Check if the string is a valid ip address representation. More... | |
uint32 | CreatePIDFile (const std::string &filename) |
create PID file More... | |
uint32 | GetPID () |
AC_COMMON_API std::string | Acore::Impl::ByteArrayToHexStr (uint8 const *bytes, std::size_t length, bool reverse=false) |
AC_COMMON_API void | Acore::Impl::HexStrToByteArray (std::string_view str, uint8 *out, std::size_t outlen, bool reverse=false) |
template<typename Container > | |
std::string | ByteArrayToHexStr (Container const &c, bool reverse=false) |
template<std::size_t Size> | |
void | HexStrToByteArray (std::string_view str, std::array< uint8, Size > &buf, bool reverse=false) |
template<std::size_t Size> | |
std::array< uint8, Size > | HexStrToByteArray (std::string_view str, bool reverse=false) |
AC_COMMON_API bool | StringEqualI (std::string_view str1, std::string_view str2) |
bool | StringStartsWith (std::string_view haystack, std::string_view needle) |
bool | StringStartsWithI (std::string_view haystack, std::string_view needle) |
AC_COMMON_API bool | StringContainsStringI (std::string_view haystack, std::string_view needle) |
template<typename T > | |
bool | ValueContainsStringI (std::pair< T, std::string_view > const &haystack, std::string_view needle) |
AC_COMMON_API bool | StringCompareLessI (std::string_view a, std::string_view b) |
template<class T > | |
bool | CompareValues (ComparisionType type, T val1, T val2) |
template<typename E > | |
constexpr std::underlying_type< E >::type | AsUnderlyingType (E enumValue) |
template<typename Ret , typename T1 , typename... T> | |
Ret * | Coalesce (T1 *first, T *... rest) |
AC_COMMON_API std::string | GetTypeName (std::type_info const &) |
template<typename T > | |
std::string | GetTypeName () |
template<typename T > | |
std::enable_if_t<!std::is_same_v< std::decay_t< T >, std::type_info >, std::string > | GetTypeName (T &&v) |
enum ComparisionType |
Enumerator | |
---|---|
COMP_TYPE_EQ | |
COMP_TYPE_HIGH | |
COMP_TYPE_LOW | |
COMP_TYPE_HIGH_EQ | |
COMP_TYPE_LOW_EQ | |
COMP_TYPE_MAX |
|
inline |
References CalculatePct().
Referenced by KillRewarder::_RewardXP(), HostileReference::addThreatPercent(), Unit::CalcAbsorbResist(), Unit::CalcArmorReducedDamage(), spell_gen_reduced_above_60_aura::CalculateAmount(), spell_hun_cower::CalculateAmount(), spell_pri_lightwell_renew::CalculateAmount(), spell_pal_sacred_shield_base::CalculateAmount(), spell_sha_earth_shield::CalculateAmount(), spell_warr_rend::CalculateAmount(), AuraEffect::CalculateAmount(), spell_dru_treant_scaling::CalculateAPAmount(), spell_hun_generic_scaling::CalculateAPAmount(), Unit::CalculateLevelPenalty(), Unit::CalculateMeleeDamage(), Player::CalculateQuestRewardXP(), spell_hun_generic_scaling::CalculateSPAmount(), CalculateSpellAmount(), Unit::CalculateSpellDamageTaken(), spell_dk_pet_scaling::CalculateStatAmount(), spell_hun_generic_scaling::CalculateStatAmount(), Spell::Delayed(), Spell::DelayedChannel(), Spell::EffectSchoolDMG(), Spell::EffectWeaponDmg(), Player::getMaxTimer(), Unit::GetTotalAuraMultiplier(), Unit::GetTotalAuraMultiplierByAffectMask(), Unit::GetTotalAuraMultiplierByMiscMask(), Unit::GetTotalAuraMultiplierByMiscValue(), spell_pri_shadow_word_death::HandleDamage(), spell_sha_healing_stream_totem::HandleDummy(), spell_dk_raise_ally::HandleDummy(), spell_dk_death_strike::HandleDummy(), spell_dk_scourge_strike::HandleDummy(), spell_sha_lava_lash::HandleDummy(), spell_warl_life_tap::HandleDummy(), Unit::HandleDummyAuraProc(), spell_pri_prayer_of_mending_heal::HandleHeal(), AuraEffect::HandlePeriodicHealAurasTick(), spell_hun_ascpect_of_the_viper::HandleProc(), spell_pal_sacred_shield_base::HandleProc(), Unit::MeleeDamageBonusDone(), Unit::MeleeDamageBonusTaken(), Unit::ModSpellDuration(), spell_warl_siphon_life::OnProc(), Unit::processDummyAuras(), spell_dk_death_and_decay::RecalculateDamage(), spell_gen_reduced_above_60::RecalculateDamage(), Creature::Regenerate(), Player::Regenerate(), Creature::RegenerateHealth(), Player::RegenerateHealth(), Player::RewardHonor(), Unit::RewardRage(), Battleground::RewardReputationToTeam(), Unit::SpellCriticalDamageBonus(), Unit::SpellDamageBonusDone(), Unit::SpellDamageBonusTaken(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), Unit::SpellPctDamageModsDone(), Unit::SpellPctHealingModsDone(), and Unit::UpdateSpeed().
|
inline |
References CalculatePct().
Referenced by spell_sha_earth_shield::CalculateAmount(), Spell::EffectDestroyAllTotems(), Spell::EffectSchoolDMG(), Spell::EffectWeaponDmg(), spell_warr_bloodthirst::HandleDamage(), spell_warl_life_tap::HandleDummy(), spell_warr_deep_wounds::HandleDummy(), Unit::HandleDummyAuraProc(), AuraEffect::HandlePeriodicManaLeechAuraTick(), spell_hun_glyph_of_arcane_shot::HandleProc(), spell_hun_chimera_shot::HandleScriptEffect(), Unit::MeleeDamageBonusTaken(), Player::RegenerateHealth(), and Unit::SpellDamageBonusTaken().
|
inline |
Referenced by Unit::ApplyAttackTimePercentMod(), Object::ApplyPercentModFloatValue(), Player::HandleBaseModValue(), AuraEffect::HandleModThreat(), Unit::HandleStatModifier(), and Unit::ModifyPowerPct().
|
constexpr |
Referenced by SmartAIMgr::IsEventValid(), ObjectMgr::LoadCreatureAddons(), ObjectMgr::LoadCreatureTemplateAddons(), ObjectMgr::LoadVehicleSeatAddon(), WorldObject::SetVisibilityDistanceOverride(), and CreatureMovementData::ToString().
std::string ByteArrayToHexStr | ( | Container const & | c, |
bool | reverse = false |
||
) |
References Acore::Impl::ByteArrayToHexStr().
Referenced by WardenMac::Init(), WardenWin::Init(), and UpdateFetcher::Update().
|
inline |
Referenced by spell_shield_generator_aura::Absorb(), spell_charge_shield_bomber_aura::Absorb(), spell_dk_anti_magic_shell_raid::Absorb(), spell_dk_anti_magic_shell_self::Absorb(), spell_dk_anti_magic_zone::Absorb(), spell_dk_spell_deflection::Absorb(), spell_dk_will_of_the_necropolis::Absorb(), spell_dru_moonkin_form_passive::Absorb(), spell_dru_primal_tenacity::Absorb(), spell_rog_nerves_of_steel::Absorb(), spell_sha_astral_shift::Absorb(), spell_dru_savage_defense::Absorb(), spell_pal_ardent_defender::Absorb(), AddPct(), ApplyPct(), Player::ApplySpellMod(), Unit::Attack(), Unit::CalcAbsorbResist(), Unit::CalcArmorReducedDamage(), SpellInfo::CalcPowerCost(), spell_mark_of_kazzak_aura::CalculateAmount(), spell_dru_owlkin_frenzy::CalculateAmount(), spell_dru_rip::CalculateAmount(), spell_dru_innervate::CalculateAmount(), spell_gen_lifeblood::CalculateAmount(), spell_pal_sacred_shield_base::CalculateAmount(), spell_warl_demonic_knowledge::CalculateAmount(), spell_dru_treant_scaling::CalculateAPAmount(), spell_hun_generic_scaling::CalculateAPAmount(), spell_pri_shadowfiend_scaling::CalculateAPAmount(), spell_sha_feral_spirit_scaling::CalculateAPAmount(), spell_sha_fire_elemental_scaling::CalculateAPAmount(), spell_warl_generic_scaling::CalculateAPAmount(), spell_warl_infernal_scaling::CalculateAPAmount(), Player::CalculateReputationGain(), spell_dru_treant_scaling::CalculateResistanceAmount(), spell_hun_generic_scaling::CalculateResistanceAmount(), spell_mage_pet_scaling::CalculateResistanceAmount(), spell_pri_shadowfiend_scaling::CalculateResistanceAmount(), spell_sha_feral_spirit_scaling::CalculateResistanceAmount(), spell_sha_fire_elemental_scaling::CalculateResistanceAmount(), spell_warl_generic_scaling::CalculateResistanceAmount(), spell_warl_infernal_scaling::CalculateResistanceAmount(), spell_dk_pet_scaling::CalculateSPAmount(), spell_dru_treant_scaling::CalculateSPAmount(), spell_hun_generic_scaling::CalculateSPAmount(), spell_mage_pet_scaling::CalculateSPAmount(), spell_pri_shadowfiend_scaling::CalculateSPAmount(), spell_sha_feral_spirit_scaling::CalculateSPAmount(), spell_sha_fire_elemental_scaling::CalculateSPAmount(), spell_warl_generic_scaling::CalculateSPAmount(), spell_warl_infernal_scaling::CalculateSPAmount(), CalculateSpellAmount(), spell_dk_pet_scaling::CalculateStatAmount(), spell_dru_treant_scaling::CalculateStatAmount(), spell_hun_generic_scaling::CalculateStatAmount(), spell_mage_pet_scaling::CalculateStatAmount(), spell_pri_shadowfiend_scaling::CalculateStatAmount(), spell_sha_feral_spirit_scaling::CalculateStatAmount(), spell_sha_fire_elemental_scaling::CalculateStatAmount(), spell_warl_generic_scaling::CalculateStatAmount(), spell_warl_infernal_scaling::CalculateStatAmount(), Unit::CountPctFromCurHealth(), Unit::CountPctFromMaxHealth(), Unit::DealDamage(), Spell::DelayedChannel(), ThreatMgr::DoAddThreat(), Spell::EffectDestroyAllTotems(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectPowerBurn(), Spell::EffectResurrect(), Spell::EffectSchoolDMG(), Spell::EffectSelfResurrect(), AuctionEntry::GetAuctionCut(), AuctionHouseMgr::GetAuctionDeposit(), AuctionEntry::GetAuctionOutBid(), Unit::GetCombatRatingDamageReduction(), spell_mt_phoenix_burn::HandleAfterCast(), spell_sha_totem_of_wrath::HandleAfterCast(), spell_warl_haunt::HandleAfterHit(), AuraEffect::HandleAuraModIncreaseHealthPercent(), Unit::HandleAuraProc(), Aura::HandleAuraSpecificMods(), spell_dru_lifebloom::HandleDispel(), spell_dk_raise_ally::HandleDummy(), spell_sha_mana_tide_totem::HandleDummy(), spell_warr_concussion_blow::HandleDummy(), Unit::HandleDummyAuraProc(), AuraEffect::HandleModPowerCostPCT(), AuraEffect::HandlePeriodicManaLeechAuraTick(), spell_mage_ignite::HandleProc(), spell_hun_ascpect_of_the_viper::HandleProc(), spell_yogg_saron_grim_reprisal_aura::HandleProc(), spell_dru_t10_balance_4p_bonus::HandleProc(), spell_dru_living_seed::HandleProc(), spell_item_blessing_of_ancient_kings::HandleProc(), spell_item_necrotic_touch::HandleProc(), spell_mage_burnout::HandleProc(), spell_mage_master_of_elements::HandleProc(), spell_pri_divine_aegis::HandleProc(), spell_pri_glyph_of_prayer_of_healing::HandleProc(), spell_sha_t10_restoration_4p_bonus::HandleProc(), spell_sha_item_mana_surge::HandleProc(), spell_sha_t8_electrified::HandleProc(), spell_warl_drain_soul::HandleProc(), Unit::HandleProcTriggerSpell(), spell_hun_chimera_shot::HandleScriptEffect(), boss_curator::JustEngagedWith(), spell_valanar_kinetic_bomb_absorb_aura::OnAbsorb(), spell_blood_queen_essence_of_the_blood_queen_aura::OnProc(), spell_pal_eye_for_an_eye::OnProc(), spell_warl_siphon_life::OnProc(), spell_warl_fel_synergy::OnProc(), spell_warr_damage_shield::OnProc(), spell_item_oracle_ablutions::PrepareSpellScript(), spell_pilgrims_bounty_food_aura::RecalculateHook(), Unit::RecalculateObjectScale(), spell_pri_power_word_shield_aura::ReflectDamage(), OPvPCapturePoint::SetCapturePointData(), Unit::SpellBaseDamageBonusDone(), Unit::SpellBaseHealingBonusDone(), spell_dk_anti_magic_shell_self::Trigger(), spell_mage_incanters_absorbtion_base_AuraScript::Trigger(), Player::UpdateArmor(), Player::UpdateAttackPowerAndDamage(), Player::UpdateManaRegen(), and Player::UpdateRating().
|
inline |
Referenced by strToLower().
|
inline |
Referenced by strToUpper().
Ret * Coalesce | ( | T1 * | first, |
T *... | rest | ||
) |
bool CompareValues | ( | ComparisionType | type, |
T | val1, | ||
T | val2 | ||
) |
References ABORT, COMP_TYPE_EQ, COMP_TYPE_HIGH, COMP_TYPE_HIGH_EQ, COMP_TYPE_LOW, and COMP_TYPE_LOW_EQ.
Referenced by Condition::Meets(), and AchievementCriteriaData::Meets().
AC_COMMON_API bool consoleToUtf8 | ( | std::string_view | conStr, |
std::string & | utf8str | ||
) |
References WStrToUtf8().
Referenced by Acore::ACLogSink< T >::write().
uint32 CreatePIDFile | ( | const std::string & | filename | ) |
std::wstring GetMainPartOfName | ( | std::wstring const & | wname, |
uint32 | declension | ||
) |
uint32 GetPID | ( | ) |
Referenced by CreatePIDFile().
std::string GetTypeName | ( | ) |
AC_COMMON_API std::string GetTypeName | ( | std::type_info const & | info | ) |
std::enable_if_t<!std::is_same_v< std::decay_t< T >, std::type_info >, std::string > GetTypeName | ( | T && | v | ) |
References GetTypeName().
std::array< uint8, Size > HexStrToByteArray | ( | std::string_view | str, |
bool | reverse = false |
||
) |
References HexStrToByteArray().
void HexStrToByteArray | ( | std::string_view | str, |
std::array< uint8, Size > & | buf, | ||
bool | reverse = false |
||
) |
References Acore::Impl::HexStrToByteArray().
Referenced by HexStrToByteArray(), and RealmList::LoadBuildInfo().
|
inline |
Referenced by isBasicLatinString(), isExtendedLatinCharacter(), and wcharToUpperOnlyLatin().
|
inline |
References isBasicLatinCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Referenced by GetMainPartOfName(), WorldSession::HandleSetPlayerDeclinedNames(), and isCyrillicString().
|
inline |
References isCyrillicCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Referenced by isEastAsianString().
|
inline |
References isEastAsianCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Referenced by boss_mechano_lord_capacitus::JustEngagedWith().
|
inline |
References isBasicLatinCharacter().
Referenced by isExtendedLatinString().
|
inline |
References isExtendedLatinCharacter(), and isNumericOrSpace().
Referenced by isValidString().
bool IsIPAddress | ( | char const * | ipaddress | ) |
Check if the string is a valid ip address representation.
Referenced by ban_commandscript::HandleBanHelper(), ban_commandscript::HandleBanInfoIPCommand(), and ban_commandscript::HandleUnBanHelper().
|
inline |
|
inline |
References isNumeric().
|
inline |
Referenced by character_commandscript::GetDeletedCharacterInfoList(), anonymous_namespace{Config.cpp}::IniKeyToEnvVarKey(), isNumeric(), and isNumericOrSpace().
|
inline |
References isNumeric().
Referenced by isBasicLatinString(), isCyrillicString(), isEastAsianString(), and isExtendedLatinString().
AC_COMMON_API Optional< int32 > MoneyStringToMoney | ( | std::string_view | moneyString | ) |
References Acore::Tokenize().
Referenced by modify_commandscript::HandleModifyMoneyCommand().
|
inline |
Referenced by Unit::CalcAbsorbResist(), and npc_echo_of_medivh::HandlePieceMoveByAI().
std::string secsToTimeString | ( | uint64 | timeInSecs, |
bool | shortText = false |
||
) |
References DAY, HOUR, and MINUTE.
Referenced by BanMgr::BanAccount(), BanMgr::BanAccountByPlayerName(), BanMgr::BanCharacter(), BanMgr::BanIP(), GmTicket::FormatMessageString(), ban_commandscript::HandleBanCharacterCommand(), ban_commandscript::HandleBanHelper(), ban_commandscript::HandleBanInfoCharacterCommand(), ban_commandscript::HandleBanInfoHelper(), ban_commandscript::HandleBanInfoIPCommand(), deserter_commandscript::HandleDeserterAdd(), deserter_commandscript::HandleDeserterRemove(), deserter_commandscript::HandleDeserterRemoveAll(), event_commandscript::HandleEventInfoCommand(), gobject_commandscript::HandleGameObjectTargetCommand(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), WorldSession::HandleMessagechatOpcode(), misc_commandscript::HandleMuteCommand(), npc_commandscript::HandleNpcInfoCommand(), npc_commandscript::HandleNpcSetSpawnTimeCommand(), misc_commandscript::HandlePInfoCommand(), server_commandscript::HandleServerInfoCommand(), WorldSession::HandleTextEmoteOpcode(), main(), GmTicket::SetChatLog(), and World::ShutdownMsg().
AC_COMMON_API bool StringCompareLessI | ( | std::string_view | a, |
std::string_view | b | ||
) |
Referenced by StringCompareLessI_T::operator()().
AC_COMMON_API bool StringContainsStringI | ( | std::string_view | haystack, |
std::string_view | needle | ||
) |
Referenced by arena_commandscript::HandleArenaLookupCommand(), and ValueContainsStringI().
AC_COMMON_API bool StringEqualI | ( | std::string_view | str1, |
std::string_view | str2 | ||
) |
Referenced by Acore::Impl::StringConvertImpl::For< T, std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, bool > > >::FromString(), Acore::Impl::StringConvertImpl::For< bool, void >::FromString(), Acore::Impl::StringConvertImpl::For< T, std::enable_if_t< std::is_floating_point_v< T > > >::FromString(), Acore::Impl::ChatCommands::ChatCommandNode::GetAutoCompletionsFor(), Field::GetData(), GuildMgr::GetGuildByName(), misc_commandscript::HandleLinkGraveCommand(), modify_commandscript::HandleModifyGenderCommand(), misc_commandscript::HandleNearGraveCommand(), anonymous_namespace{Field.cpp}::IsCorrectAlias(), Acore::Impl::ChatCommands::ArgInfo< T, std::enable_if_t< std::is_enum_v< T > > >::Match(), Acore::Impl::ChatCommands::ChatCommandNode::SendCommandHelpFor(), StringStartsWithI(), Acore::ChatCommands::ExactSequence< chars >::TryConsume(), and Acore::Impl::ChatCommands::ChatCommandNode::TryExecuteCommand().
|
inline |
Referenced by cast_commandscript::GetTriggerFlags(), misc_commandscript::HandleDamageCommand(), server_commandscript::HandleServerSetClosedCommand(), and Acore::Impl::ChatCommands::ArgInfo< Acore::ChatCommands::Variant< Ts... > >::TryAtIndex().
|
inline |
References StringEqualI().
Referenced by Acore::Impl::ChatCommands::FilteredCommandListIterator::_skip(), and Acore::Impl::ChatCommands::ArgInfo< T, std::enable_if_t< std::is_enum_v< T > > >::Match().
void stripLineInvisibleChars | ( | std::string & | src | ) |
uint32 TimeStringToSecs | ( | const std::string & | timestring | ) |
References DAY, HOUR, and MINUTE.
Referenced by BanMgr::BanAccount(), BanMgr::BanAccountByPlayerName(), BanMgr::BanCharacter(), BanMgr::BanIP(), ban_commandscript::HandleBanCharacterCommand(), ban_commandscript::HandleBanHelper(), bf_commandscript::HandleBattlefieldTimer(), deserter_commandscript::HandleDeserterAdd(), deserter_commandscript::HandleDeserterRemoveAll(), misc_commandscript::HandleMuteCommand(), npc_commandscript::HandleNpcSetSpawnTimeCommand(), server_commandscript::HandleServerIdleRestartCommand(), server_commandscript::HandleServerIdleShutDownCommand(), server_commandscript::HandleServerRestartCommand(), and server_commandscript::HandleServerShutDownCommand().
AC_COMMON_API bool Utf8FitTo | ( | std::string_view | str, |
std::wstring_view | search | ||
) |
References Utf8toWStr(), and wstrToLower().
Referenced by AuctionHouseObject::BuildListAuctionItems(), learn_commandscript::HandleLearnAllRecipesCommand(), lookup_commandscript::HandleLookupAreaCommand(), lookup_commandscript::HandleLookupCreatureCommand(), lookup_commandscript::HandleLookupEventCommand(), lookup_commandscript::HandleLookupFactionCommand(), lookup_commandscript::HandleLookupItemCommand(), lookup_commandscript::HandleLookupItemSetCommand(), lookup_commandscript::HandleLookupMapCommand(), lookup_commandscript::HandleLookupObjectCommand(), lookup_commandscript::HandleLookupQuestCommand(), lookup_commandscript::HandleLookupSkillCommand(), lookup_commandscript::HandleLookupSpellCommand(), lookup_commandscript::HandleLookupTaxiNodeCommand(), lookup_commandscript::HandleLookupTitleCommand(), WorldSession::HandleWhoOpcode(), and list_commandscript::ShouldListAura().
std::size_t utf8length | ( | std::string & | utf8str | ) |
Referenced by AccountMgr::ChangeEmail(), AccountMgr::ChangePassword(), AccountMgr::ChangeUsername(), and AccountMgr::CreateAccount().
AC_COMMON_API void utf8printf | ( | FILE * | out, |
const char * | str, | ||
... | |||
) |
References vutf8printf().
Referenced by AppenderConsole::_write().
AC_COMMON_API bool utf8ToConsole | ( | std::string_view | utf8str, |
std::string & | conStr | ||
) |
References Utf8toWStr().
AC_COMMON_API bool Utf8ToUpperOnlyLatin | ( | std::string & | utf8String | ) |
References Utf8toWStr(), wcharToUpperOnlyLatin(), and WStrToUtf8().
Referenced by AccountMgr::ChangeEmail(), AccountMgr::ChangePassword(), AccountMgr::ChangeUsername(), RASession::CheckAccessLevel(), RASession::CheckPassword(), AccountMgr::CheckPassword(), AccountMgr::CreateAccount(), account_commandscript::HandleAccountDeleteCommand(), account_commandscript::HandleAccountRemoveLockCountryCommand(), account_commandscript::HandleAccountSet2FACommand(), account_commandscript::HandleAccountSetAddonCommand(), account_commandscript::HandleAccountSetEmailCommand(), account_commandscript::HandleAccountSetGmLevelCommand(), account_commandscript::HandleAccountSetPasswordCommand(), ban_commandscript::HandleBanHelper(), ban_commandscript::HandleBanInfoAccountCommand(), lookup_commandscript::HandleLookupPlayerAccountCommand(), misc_commandscript::HandleMuteInfoCommand(), ban_commandscript::HandleUnBanHelper(), PlayerDump::InitializeTables(), AccountInfo::LoadResult(), StringsEqualCaseInsensitive(), and Acore::ChatCommands::AccountIdentifier::TryConsume().
AC_COMMON_API bool Utf8toWStr | ( | char const * | utf8str, |
std::size_t | csize, | ||
wchar_t * | wstr, | ||
std::size_t & | wsize | ||
) |
References Acore::CheckedBufferOutputIterator< T >::remaining().
Referenced by ObjectMgr::AddGameTele(), ObjectMgr::AddProfanityPlayerName(), ObjectMgr::AddReservedPlayerName(), ObjectMgr::CheckDeclinedNames(), ObjectMgr::CheckPetName(), ObjectMgr::CheckPlayerName(), ObjectMgr::DeleteGameTele(), AuctionListItemsDelayEvent::Execute(), ChannelMgr::GetChannel(), ObjectMgr::GetGameTele(), Graveyard::GetGraveyard(), ChannelMgr::GetJoinChannel(), go_commandscript::HandleGoXYZCommand(), lookup_commandscript::HandleLookupAreaCommand(), lookup_commandscript::HandleLookupCreatureCommand(), lookup_commandscript::HandleLookupEventCommand(), lookup_commandscript::HandleLookupFactionCommand(), lookup_commandscript::HandleLookupItemCommand(), lookup_commandscript::HandleLookupItemSetCommand(), lookup_commandscript::HandleLookupMapCommand(), lookup_commandscript::HandleLookupObjectCommand(), lookup_commandscript::HandleLookupQuestCommand(), lookup_commandscript::HandleLookupSkillCommand(), lookup_commandscript::HandleLookupSpellCommand(), lookup_commandscript::HandleLookupTaxiNodeCommand(), lookup_commandscript::HandleLookupTeleCommand(), lookup_commandscript::HandleLookupTitleCommand(), modify_commandscript::HandleModifyRepCommand(), WorldSession::HandlePetRename(), server_commandscript::HandleServerIdleRestartCommand(), server_commandscript::HandleServerIdleShutDownCommand(), server_commandscript::HandleServerRestartCommand(), server_commandscript::HandleServerSetMotdCommand(), server_commandscript::HandleServerShutDownCommand(), WorldSession::HandleSetPlayerDeclinedNames(), WorldSession::HandleWhoOpcode(), ObjectMgr::IsProfanityName(), ObjectMgr::IsReservedName(), ObjectMgr::IsValidChannelName(), ObjectMgr::IsValidCharterName(), ChannelMgr::LoadChannels(), ObjectMgr::LoadGameTele(), Graveyard::LoadGraveyardFromDB(), ObjectMgr::LoadProfanityNamesFromDB(), ObjectMgr::LoadProfanityNamesFromDBC(), ObjectMgr::LoadReservedPlayerNamesDB(), ObjectMgr::LoadReservedPlayerNamesDBC(), normalizePlayerName(), Acore::ChatCommands::WTail::TryConsume(), Acore::Impl::ChatCommands::ArgInfo< std::wstring, void >::TryConsume(), WhoListCacheMgr::Update(), Utf8FitTo(), utf8ToConsole(), Utf8ToUpperOnlyLatin(), and vutf8printf().
AC_COMMON_API bool Utf8toWStr | ( | std::string_view | utf8str, |
std::wstring & | wstr | ||
) |
Referenced by Utf8toWStr().
|
inline |
References Utf8toWStr().
void utf8truncate | ( | std::string & | utf8str, |
std::size_t | len | ||
) |
Referenced by PlayerSocial::SetFriendNote(), and Guild::BankTab::SetText().
|
inline |
References StringContainsStringI().
AC_COMMON_API void vutf8printf | ( | FILE * | out, |
const char * | str, | ||
va_list * | ap | ||
) |
References Utf8toWStr().
Referenced by utf8printf().
|
inline |
Referenced by wstrToLower().
|
inline |
Referenced by normalizePlayerName(), wcharToUpperOnlyLatin(), and wstrToUpper().
|
inline |
References isBasicLatinCharacter(), and wcharToUpper().
Referenced by Utf8ToUpperOnlyLatin().
void wstrToLower | ( | std::wstring & | str | ) |
References wcharToLower().
Referenced by ObjectMgr::AddGameTele(), ObjectMgr::AddProfanityPlayerName(), ObjectMgr::AddReservedPlayerName(), ObjectMgr::CheckPlayerName(), ObjectMgr::DeleteGameTele(), AuctionListItemsDelayEvent::Execute(), ChannelMgr::GetChannel(), ObjectMgr::GetGameTele(), Graveyard::GetGraveyard(), ChannelMgr::GetJoinChannel(), learn_commandscript::HandleLearnAllRecipesCommand(), lookup_commandscript::HandleLookupAreaCommand(), lookup_commandscript::HandleLookupCreatureCommand(), lookup_commandscript::HandleLookupEventCommand(), lookup_commandscript::HandleLookupFactionCommand(), lookup_commandscript::HandleLookupItemCommand(), lookup_commandscript::HandleLookupItemSetCommand(), lookup_commandscript::HandleLookupMapCommand(), lookup_commandscript::HandleLookupObjectCommand(), lookup_commandscript::HandleLookupQuestCommand(), lookup_commandscript::HandleLookupSkillCommand(), lookup_commandscript::HandleLookupSpellCommand(), lookup_commandscript::HandleLookupTaxiNodeCommand(), lookup_commandscript::HandleLookupTeleCommand(), lookup_commandscript::HandleLookupTitleCommand(), modify_commandscript::HandleModifyRepCommand(), WorldSession::HandleWhoOpcode(), ObjectMgr::IsProfanityName(), ObjectMgr::IsReservedName(), list_commandscript::ListAurasCommand(), ObjectMgr::LoadGameTele(), Graveyard::LoadGraveyardFromDB(), ObjectMgr::LoadProfanityNamesFromDB(), ObjectMgr::LoadReservedPlayerNamesDB(), normalizePlayerName(), WhoListCacheMgr::Update(), and Utf8FitTo().
void wstrToUpper | ( | std::wstring & | str | ) |
References wcharToUpper().
AC_COMMON_API bool WStrToUtf8 | ( | std::wstring_view | wstr, |
std::string & | utf8str | ||
) |
AC_COMMON_API bool WStrToUtf8 | ( | wchar_t const * | wstr, |
std::size_t | size, | ||
std::string & | utf8str | ||
) |
Referenced by CliThread(), consoleToUtf8(), server_commandscript::HandleServerIdleRestartCommand(), server_commandscript::HandleServerIdleShutDownCommand(), server_commandscript::HandleServerRestartCommand(), server_commandscript::HandleServerSetMotdCommand(), server_commandscript::HandleServerShutDownCommand(), normalizePlayerName(), and Utf8ToUpperOnlyLatin().