AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::Impl::ChatCommands::ArgInfo< std::wstring, void > Struct Reference

#include "ChatCommandArgs.h"

Static Public Member Functions

static ChatCommandResult TryConsume (std::wstring &val, ChatHandler const *handler, std::string_view args)
 

Detailed Description

Member Function Documentation

◆ TryConsume()

static ChatCommandResult Acore::Impl::ChatCommands::ArgInfo< std::wstring, void >::TryConsume ( std::wstring &  val,
ChatHandler const *  handler,
std::string_view  args 
)
inlinestatic
109 {
110 std::string_view utf8view;
111 ChatCommandResult next = ArgInfo<std::string_view>::TryConsume(utf8view, handler, args);
112
113 if (next)
114 {
115 if (Utf8toWStr(utf8view, val))
116 return next;
117 else
119 }
120 else
121 return std::nullopt;
122 }
bool Utf8toWStr(char const *utf8str, std::size_t csize, wchar_t *wstr, std::size_t &wsize)
Definition: Util.cpp:281
@ LANG_CMDPARSER_INVALID_UTF8
Definition: Language.h:994
AC_GAME_API char const * GetAcoreString(ChatHandler const *handler, AcoreStrings which)
Definition: ChatCommandHelpers.cpp:27
Definition: ChatCommandHelpers.h:100

References Acore::Impl::ChatCommands::GetAcoreString(), LANG_CMDPARSER_INVALID_UTF8, and Utf8toWStr().