ManaPlus
|
Go to the source code of this file.
Functions | |
std::string & | trim (std::string &str) |
std::string & | toLower (std::string &str) |
std::string & | toUpper (std::string &str) |
unsigned int | atox (const std::string &str) |
std::string | toString (uint32_t num) |
std::string | toString (uint64_t num) |
std::string | toString (unsigned char num) |
std::string | toString (int32_t num) |
std::string | toString (uint16_t num) |
std::string | toString (const float num) |
std::string | toString (const double num) |
std::string | toStringPrint (const unsigned int val) |
const char * | ipToString (const uint32_t address) |
std::string | strprintf (const char *const format,...) |
std::string | removeColors (std::string msg) |
const std::string | findSameSubstring (const std::string &str1, const std::string &str2) |
const std::string | findSameSubstringI (const std::string &str1, const std::string &str2) |
int | compareStrI (const std::string &a, const std::string &b) |
bool | isWordSeparator (const signed char chr) A_CONST |
size_t | findI (std::string str, std::string subStr) |
size_t | findI (std::string text, const StringVect &list) |
size_t | findAny (const std::string &text, const std::string &chars, const size_t pos) |
const std::string | encodeStr (unsigned int value, const unsigned int size) |
unsigned int | decodeStr (const std::string &str) |
std::string | extractNameFromSprite (std::string str) |
std::string | removeSpriteIndex (std::string str) |
const char * | getSafeUtf8String (const std::string &text) |
void | getSafeUtf8String (std::string text, char *const buf) |
std::string | getFileName (const std::string &path) |
std::string | getFileDir (const std::string &path) |
std::string & | replaceAll (std::string &context, const std::string &from, const std::string &to) |
void | replaceRecursiveAll (std::string &context, const std::string &from, const char to) |
bool | getBoolFromString (const std::string &text) |
void | replaceSpecialChars (std::string &text) |
std::string | normalize (const std::string &name) |
void | splitToIntSet (std::set< int > &tokens, const std::string &text, const char separator) |
std::list< int > | splitToIntList (const std::string &text, const char separator) |
std::list< std::string > | splitToStringList (const std::string &text, const char separator) |
void | splitToStringVector (StringVect &tokens, const std::string &text, const char separator) |
void | splitToStringSet (std::set< std::string > &tokens, const std::string &text, const char separator) |
void | splitToIntVector (std::vector< int > &tokens, const std::string &text, const char separator) |
std::string | combineDye (std::string file, const std::string &dye) |
std::string | combineDye2 (std::string file, const std::string &dye) |
std::string | combineDye3 (std::string file, const std::string &dye) |
std::string | packList (const std::list< std::string > &list) |
std::list< std::string > | unpackList (const std::string &str) |
std::string | stringToHexPath (const std::string &str) |
void | deleteCharLeft (std::string &str, unsigned *const pos) |
bool | findLast (const std::string &str1, const std::string &str2) |
bool | findFirst (const std::string &str1, const std::string &str2) |
bool | findCutLast (std::string &str1, const std::string &str2) |
void | cutLast (std::string &str1, const std::string &str2) |
bool | findCutFirst (std::string &str1, const std::string &str2) |
void | cutFirst (std::string &str1, const std::string &str2) |
std::string & | removeProtocol (std::string &url) |
bool | strStartWith (const std::string &str, const std::string &start) |
std::string | getDateString () |
std::string | getDateTimeString () |
signed char | parseBoolean (const std::string &value) |
std::string | encodeLinkText (std::string data) |
std::string | decodeLinkText (std::string data) |
bool | isDigit (const std::string &str) |
void | secureChatCommand (std::string &str) |
bool | parse2Int (const std::string &args, int &x, int &y) |
bool | parse2Str (const std::string &args, std::string &str1, std::string &str2) |
uint32_t | parseNumber (const std::string &str) |
std::string | removeToken (std::string &str, const std::string &token) |
std::string | timeToStr (const uint32_t time) |
std::string | timeDiffToString (int timeDiff) |
void | replaceItemLinks (std::string &msg) |
std::string | escapeString (std::string str) |
void | sanitizePath (std::string &path) |
std::string | pathJoin (std::string str1, const std::string &str2) |
std::string | pathJoin (std::string str1, const std::string &str2, const std::string &str3) |
std::string | urlJoin (std::string str1, const std::string &str2) |
size_t | rfindSepatator (const std::string &str1) |
unsigned int atox | ( | const std::string & | str | ) |
Converts an ascii hexidecimal string to an integer
str | the hex string to convert to an int |
Definition at line 78 of file stringutils.cpp.
Referenced by UserPalette::addColor().
std::string combineDye | ( | std::string | file, |
const std::string & | dye | ||
) |
Definition at line 527 of file stringutils.cpp.
Referenced by Being::setGender(), Being::setHairTempSprite(), Being::setSpriteCards(), Being::setSpriteColor(), Being::setSpriteColorId(), and Being::setTempSprite().
std::string combineDye2 | ( | std::string | file, |
const std::string & | dye | ||
) |
Definition at line 538 of file stringutils.cpp.
References splitToStringList().
Referenced by Item::getImage(), Item::setId(), ItemPopup::setItem(), and ActorSprite::setupSpriteDisplay().
std::string combineDye3 | ( | std::string | file, |
const std::string & | dye | ||
) |
Definition at line 563 of file stringutils.cpp.
References splitToStringList().
Referenced by ActorSprite::setupSpriteDisplay().
int compareStrI | ( | const std::string & | a, |
const std::string & | b | ||
) |
Compares the two strings case-insensitively.
a | the first string in the comparison |
b | the second string in the comparison |
Definition at line 135 of file stringutils.cpp.
Referenced by ServerDialog::loadServers(), anonymous_namespace{whoisonline.cpp}::NameFunctuator::operator()(), ServerInfo::parseFreeType(), ServerInfo::parseType(), readColorGradient(), readColorType(), and readProgressType().
void cutFirst | ( | std::string & | str1, |
const std::string & | str2 | ||
) |
Definition at line 705 of file stringutils.cpp.
Referenced by Game::saveScreenshot(), and GraphicsManager::setGLVersion().
void cutLast | ( | std::string & | str1, |
const std::string & | str2 | ||
) |
Definition at line 679 of file stringutils.cpp.
std::string decodeLinkText | ( | std::string | data | ) |
Definition at line 772 of file stringutils.cpp.
References data, and replaceAll().
Referenced by WhoIsOnline::handleLink().
unsigned int decodeStr | ( | const std::string & | str | ) |
Definition at line 248 of file stringutils.cpp.
References anonymous_namespace{stringutils.cpp}::base, and anonymous_namespace{stringutils.cpp}::start.
Referenced by ShopWindow::showList().
void deleteCharLeft | ( | std::string & | str, |
unsigned *const | pos | ||
) |
Definition at line 624 of file stringutils.cpp.
Referenced by TextField::caretDeleteWord(), TextField::handleCtrlKeys(), and TextField::handleNormalKeys().
std::string encodeLinkText | ( | std::string | data | ) |
Definition at line 767 of file stringutils.cpp.
References data, and replaceAll().
Referenced by BrowserBox::addRow(), StaticBrowserBox::addRow(), WhoIsOnline::prepareNick(), and OnlinePlayer::setText().
const std::string encodeStr | ( | unsigned int | value, |
const unsigned int | size | ||
) |
Definition at line 231 of file stringutils.cpp.
References anonymous_namespace{stringutils.cpp}::base, CAST_S8, EmoteDB::size(), and anonymous_namespace{stringutils.cpp}::start.
Referenced by ShopWindow::giveList(), and ShopWindow::sendMessage().
std::string escapeString | ( | std::string | str | ) |
Definition at line 1016 of file stringutils.cpp.
References replaceAll().
Referenced by PopupMenu::handleLink().
std::string extractNameFromSprite | ( | std::string | str | ) |
Definition at line 263 of file stringutils.cpp.
References CAST_S32, CAST_SIZE, and EmoteDB::size().
Referenced by Inventory::findItemBySprite().
size_t findAny | ( | const std::string & | text, |
const std::string & | chars, | ||
const size_t | pos | ||
) |
bool findCutFirst | ( | std::string & | str1, |
const std::string & | str2 | ||
) |
Definition at line 690 of file stringutils.cpp.
Referenced by VirtFs::FsZip::enumerate(), EAthena::ChatRecv::extractChannelFromMessage(), VirtFs::FsZip::getDirs(), VirtFs::FsZip::getFiles(), VirtFs::FsZip::getFilesWithDir(), getPicturesDir(), GuildManager::process(), EAthena::ChatRecv::processColorChat(), EAthena::ChatRecv::processGmChat(), and GraphicsManager::setGLVersion().
bool findCutLast | ( | std::string & | str1, |
const std::string & | str2 | ||
) |
Definition at line 664 of file stringutils.cpp.
Referenced by Theme::fillSoundsList(), Theme::load(), GuildManager::process(), and EAthena::ChatRecv::processColorChat().
bool findFirst | ( | const std::string & | str1, |
const std::string & | str2 | ||
) |
size_t findI | ( | std::string | str, |
std::string | subStr | ||
) |
Definition at line 189 of file stringutils.cpp.
References toLower().
Referenced by ChatWindow::addGlobalMessage(), ChatWindow::addToAwayLog(), GraphicsManager::detectGraphics(), ChatWindow::findHighlight(), and ChatWindow::resortChatLog().
size_t findI | ( | std::string | text, |
const StringVect & | list | ||
) |
Definition at line 196 of file stringutils.cpp.
bool findLast | ( | const std::string & | str1, |
const std::string & | str2 | ||
) |
Definition at line 640 of file stringutils.cpp.
Referenced by VirtFs::enumerateFiles(), Files::enumFiles(), VirtFs::exists(), Files::existsLocal(), VirtFs::FsZip::getDirs(), VirtFs::getDirs(), VirtFs::FsZip::getFiles(), VirtFs::getFiles(), VirtFs::getFilesInDir(), VirtFs::FsZip::getFilesWithDir(), VirtFs::getFilesWithDir(), getHomePath(), VirtFs::getRealDir(), VirtFs::isDirectory(), Theme::loadColors(), VirtFs::mountDirInternal(), VirtFs::mountZip(), VirtFs::mountZip2(), VirtFs::ZipReader::readArchiveInfo(), VirtFs::FsDir::setWriteDir(), VirtFs::unmountDirInternal(), VirtFs::unmountZip(), and VirtFs::unmountZip2().
const std::string findSameSubstring | ( | const std::string & | str1, |
const std::string & | str2 | ||
) |
Definition at line 158 of file stringutils.cpp.
References CAST_S32.
Referenced by SpellManager::autoComplete().
const std::string findSameSubstringI | ( | const std::string & | str1, |
const std::string & | str2 | ||
) |
Definition at line 171 of file stringutils.cpp.
References toLower().
Referenced by ChatWindow::autoComplete().
bool getBoolFromString | ( | const std::string & | text | ) |
Returns a bool value depending on the given string value.
text | the string used to get the bool value |
Definition at line 400 of file stringutils.cpp.
References toLower(), and trim().
Referenced by Configuration::getBoolValue().
std::string getDateString | ( | ) |
Definition at line 733 of file stringutils.cpp.
Referenced by ServerDialog::downloadServerList(), and ServerDialog::needUpdateServers().
std::string getDateTimeString | ( | ) |
std::string getFileDir | ( | const std::string & | path | ) |
Definition at line 353 of file stringutils.cpp.
Referenced by Configuration::init(), and VirtFs::FsDir::init().
std::string getFileName | ( | const std::string & | path | ) |
Definition at line 338 of file stringutils.cpp.
Referenced by Setup_Theme::apply(), Setup_Theme::cancel(), and Setup_Theme::Setup_Theme().
const char* getSafeUtf8String | ( | const std::string & | text | ) |
Definition at line 308 of file stringutils.cpp.
References EmoteDB::size(), and UTF8_MAX_SIZE.
Referenced by TextChunk::generate(), and Font::getWidth().
void getSafeUtf8String | ( | std::string | text, |
char *const | buf | ||
) |
const char* ipToString | ( | const uint32_t | address | ) |
Converts the given IP address to a string.
The returned string is statically allocated, and shouldn't be freed. It is changed upon the next use of this method.
address | the address to convert to a string |
Definition at line 86 of file stringutils.cpp.
References CAST_U8.
Referenced by Ea::LoginHandler::chooseServer(), EAthena::CharServerRecv::processChangeMapServer(), TmwAthena::CharServerRecv::processChangeMapServer(), EAthena::CharServerRecv::processCharMapInfo(), TmwAthena::CharServerRecv::processCharMapInfo(), TmwAthena::BeingRecv::processIpResponse(), EAthena::LoginRecv::processLoginData(), TmwAthena::LoginRecv::processLoginData(), and Ea::Network::realConnect().
bool isDigit | ( | const std::string & | str | ) |
Definition at line 859 of file stringutils.cpp.
|
inline |
Tells wether the character is a word separator.
Definition at line 142 of file stringutils.h.
Referenced by ChatWindow::autoComplete(), ChatWindow::autoCompleteHistory(), TextField::caretDeleteWord(), TextField::moveCaretWordBack(), and TextField::moveCaretWordForward().
std::string normalize | ( | const std::string & | name | ) |
Normalize a string, which means lowercase and trim it.
Definition at line 445 of file stringutils.cpp.
References toLower(), and trim().
Referenced by ItemDB::exists(), ItemDB::get(), and ItemDB::loadXmlFile().
std::string packList | ( | const std::list< std::string > & | list | ) |
bool parse2Int | ( | const std::string & | args, |
int & | x, | ||
int & | y | ||
) |
Definition at line 879 of file stringutils.cpp.
bool parse2Str | ( | const std::string & | args, |
std::string & | str1, | ||
std::string & | str2 | ||
) |
Definition at line 899 of file stringutils.cpp.
Referenced by ItemLinkHandler::handleCommandLink(), and Ea::PlayerRecv::processPlayerClientCommand().
signed char parseBoolean | ( | const std::string & | value | ) |
Definition at line 755 of file stringutils.cpp.
uint32_t parseNumber | ( | const std::string & | str | ) |
Definition at line 919 of file stringutils.cpp.
References strStartWith().
Referenced by EAthena::ChatHandler::processRaw(), TmwAthena::ChatHandler::processRaw(), EAthena::ChatHandler::sendRaw(), and TmwAthena::ChatHandler::sendRaw().
std::string pathJoin | ( | std::string | str1, |
const std::string & | str2 | ||
) |
Definition at line 1037 of file stringutils.cpp.
Referenced by SetupItemSound::action(), Map::addExtraLayer(), UpdaterWindow::addUpdateFile(), ConfigManager::backupConfig(), Game::changeMap(), Files::deleteFilesInDirectory(), UpdaterWindow::download(), ServerDialog::downloadServerList(), VirtFs::FsZip::enumerate(), VirtFs::FsZip::exists(), Dirs::extractDataDir(), Client::gameExec(), Client::gameInit(), VirtFs::FsDir::getDirs(), VirtFs::FsZip::getDirs(), VirtFs::FsDir::getFiles(), VirtFs::FsZip::getFiles(), VirtFs::FsDir::getFilesWithDir(), VirtFs::FsZip::getFilesWithDir(), StatusEffect::getIcon(), Item::getImage(), VirtFs::getPath(), getPicturesDir(), VirtFs::FsZip::getRealDir(), Map::getUserMapDirectory(), Wallpaper::getWallpaper(), SpriteDef::includeSprite(), Dirs::initConfigDir(), Dirs::initLocalDataDir(), Dirs::initScreenshotDir(), ConfigManager::initServerConfig(), Dirs::initTempDir(), Dirs::initUpdatesDir(), VirtFs::FsZip::isDirectory(), EmoteDB::load(), HorseDB::load(), SpriteDef::load(), Theme::loadColors(), Being::loadComment(), Client::loadData(), UpdaterWindow::loadDirMods(), DidYouKnowWindow::loadFile(), VirtFs::FsZip::loadFile(), HelpWindow::loadFile(), TextCommand::loadImage(), Theme::loadInfo(), UpdaterWindow::loadLocalUpdates(), UpdaterWindow::loadManaPlusUpdates(), UpdaterWindow::loadMods(), loadMusic(), ServerDialog::loadServers(), EmoteDB::loadSpecialXmlFile(), UpdaterWindow::loadUpdates(), EmoteDB::loadXmlFile(), UpdaterWindow::logic(), Dirs::mountDataDir(), VirtFs::FsZip::openRead(), NpcDialog::parseListItems(), pathJoin(), SoundManager::playGuiSfx(), SoundManager::playGuiSound(), SoundManager::playSfx(), TestMain::readValue(), UpdaterWindow::removeUpdateFile(), Theme::resolveThemePath(), Being::saveComment(), Map::saveExtraLayer(), Files::saveTextFile(), VirtFs::searchAndAddArchives(), VirtFs::searchAndRemoveArchives(), Being::setGender(), Being::setHairTempSprite(), Item::setId(), ItemPopup::setItem(), Being::setLanguageId(), Minimap::setMap(), ChatLogger::setServerName(), Being::setSpriteCards(), Being::setSpriteColor(), Being::setSpriteColorId(), Being::setSpriteId(), Being::setTempSprite(), ActorSprite::setupSpriteDisplay(), CutInWindow::show(), TestLauncher::TestLauncher(), TestMain::TestMain(), Client::unloadData(), UpdaterWindow::unloadManaPlusUpdates(), UpdaterWindow::unloadMods(), UpdaterWindow::unloadUpdates(), Dirs::updateDataPath(), MapReader::updateMusic(), and ActorManager::updateNameId().
std::string pathJoin | ( | std::string | str1, |
const std::string & | str2, | ||
const std::string & | str3 | ||
) |
Definition at line 1075 of file stringutils.cpp.
References pathJoin().
std::string removeColors | ( | std::string | msg | ) |
Removes colors from a string
msg | the string to remove the colors from |
Definition at line 122 of file stringutils.cpp.
References Actions::msg().
Referenced by ChatWindow::addWhisper(), ChatTab::chatLog(), ChatLogger::log(), EAthena::ChatRecv::processBeingChat(), TmwAthena::ChatRecv::processBeingChat(), and Being::setSpeech().
std::string& removeProtocol | ( | std::string & | url | ) |
Definition at line 716 of file stringutils.cpp.
References Actions::url().
Referenced by UpdaterWindow::postInit().
std::string removeSpriteIndex | ( | std::string | str | ) |
Definition at line 285 of file stringutils.cpp.
References CAST_S32, CAST_SIZE, and EmoteDB::size().
Referenced by Inventory::findItemBySprite().
std::string removeToken | ( | std::string & | str, |
const std::string & | token | ||
) |
std::string& replaceAll | ( | std::string & | context, |
const std::string & | from, | ||
const std::string & | to | ||
) |
Definition at line 368 of file stringutils.cpp.
Referenced by addToken(), LocalPlayer::afkRespond(), PoParser::convertStr(), decodeLinkText(), encodeLinkText(), escapeString(), fixDirSeparators(), getPicturesDir(), ItemLinkHandler::handleHttpLink(), PopupMenu::handleLink(), Dirs::initUpdatesDir(), Setup_Mods::loadMods(), loadQuest(), SpellManager::parseCommand(), ItemInfo::replaceColors(), BrowserBoxTools::replaceVars(), replaceVars(), ChatWindow::resortChatLog(), QuestsWindow::showQuest(), TranslationManager::translateFile(), and Setup_Theme::updateInfo().
void replaceItemLinks | ( | std::string & | msg | ) |
Definition at line 1195 of file stringutils.cpp.
References FOR_EACH, ItemDB::get(), ItemInfo::getId(), Actions::itemInfo(), Actions::msg(), splitToStringVector(), strprintf(), and trim().
Referenced by ChatTab::chatInput(), and loadQuest().
void replaceRecursiveAll | ( | std::string & | context, |
const std::string & | from, | ||
const char | to | ||
) |
void replaceSpecialChars | ( | std::string & | text | ) |
Definition at line 412 of file stringutils.cpp.
References CAST_S8.
Referenced by ChatWindow::doReplace().
size_t rfindSepatator | ( | const std::string & | str1 | ) |
void sanitizePath | ( | std::string & | path | ) |
Definition at line 1022 of file stringutils.cpp.
References replaceRecursiveAll().
Referenced by prepareFsPath().
void secureChatCommand | ( | std::string & | str | ) |
Definition at line 873 of file stringutils.cpp.
Referenced by ChatWindow::autoComplete().
std::list<int> splitToIntList | ( | const std::string & | text, |
const char | separator | ||
) |
Definition at line 461 of file stringutils.cpp.
void splitToIntSet | ( | std::set< int > & | tokens, |
const std::string & | text, | ||
const char | separator | ||
) |
Definition at line 451 of file stringutils.cpp.
Referenced by PlayerInfo::loadData(), loadEffect(), Net::loadIgnorePackets(), and loadQuest().
void splitToIntVector | ( | std::vector< int > & | tokens, |
const std::string & | text, | ||
const char | separator | ||
) |
Definition at line 513 of file stringutils.cpp.
References trim().
Referenced by ItemLinkHandler::handleItemLink(), GraphicsManager::initGraphics(), ItemShortcutContainer::mouseMoved(), parseInherit(), BrowserBoxTools::replaceLinkCommands(), GraphicsManager::setVideoMode(), and SkillDialog::useItem().
std::list<std::string> splitToStringList | ( | const std::string & | text, |
const char | separator | ||
) |
Definition at line 473 of file stringutils.cpp.
Referenced by combineDye2(), combineDye3(), and unpackList().
void splitToStringSet | ( | std::set< std::string > & | tokens, |
const std::string & | text, | ||
const char | separator | ||
) |
Definition at line 499 of file stringutils.cpp.
References trim().
Referenced by Setup_Mods::loadMods(), UpdaterWindow::loadMods(), GraphicsManager::updateExtensions(), and GraphicsManager::updatePlanformExtensions().
void splitToStringVector | ( | StringVect & | tokens, |
const std::string & | text, | ||
const char | separator | ||
) |
Definition at line 485 of file stringutils.cpp.
References trim().
Referenced by InputManager::addChatCommands(), NpcDialog::createSkinControls(), Cpu::detect(), DyePalette::DyePalette(), SpriteDef::loadAnimation(), UpdaterWindow::loadDirMods(), ChatWindow::parseGlobalsFilter(), ChatWindow::parseHighlights(), GuildManager::process(), EAthena::LoginRecv::processUpdateHost2(), readField(), BeingCommon::readWalkingAttributes(), replaceItemLinks(), InputManager::retrieve(), and UpdaterWindow::unloadMods().
std::string stringToHexPath | ( | const std::string & | str | ) |
Definition at line 610 of file stringutils.cpp.
References CAST_U32, and strprintf().
Referenced by Being::loadComment(), Being::saveComment(), and ActorManager::updateNameId().
std::string strprintf | ( | const char *const | format, |
... | |||
) |
A safe version of sprintf that returns a std::string of the result.
Definition at line 100 of file stringutils.cpp.
Referenced by IPC::acceptLoop(), SocialGuildTab::action(), SocialPartyTab::action(), StatDebugTab::action(), ChangeEmailDialog::action(), ChangePasswordDialog::action(), CharSelectDialog::action(), KillStats::action(), NpcDialog::action(), RegisterDialog::action(), SocialWindow::action(), TradeWindow::action(), PopupMenu::addChat(), LocalPlayer::addHomunXpMessage(), LocalPlayer::addHpMessage(), LocalPlayer::addJobMessage(), SocialNavigationTab::addPortal(), BrowserBox::addRow(), StaticBrowserBox::addRow(), ServerInfoWindow::addServerComment(), SkillDialog::addSkill(), LocalPlayer::addSpMessage(), ChatWindow::addWhisper(), LocalPlayer::addXpMessage(), ShopWindow::announce(), Setup_Input::apply(), applyEffectByOption(), applyEffectByOption1(), StatsPageBasic::attributeChanged(), KillStats::attributeChanged(), StatusWindow::attributeChanged(), BankWindow::bankMoneyChanged(), SocialGuildTab::buildCounter(), SocialGuildTab2::buildCounter(), SocialPartyTab::buildCounter(), ChangeEmailDialog::ChangeEmailDialog(), ChangePasswordDialog::ChangePasswordDialog(), Actions::changeRelation(), CharacterViewSmall::CharacterViewSmall(), CharSelectDialog::CharSelectDialog(), ChatTab::chatLog(), LocalPlayer::checkNewName(), InventoryWindow::combineItems(), compareSDLVersions(), NpcDialog::complexItemToStr(), Ea::AdminHandler::createItems(), Desktop::Desktop(), EAthena::Network::dispatchMessages(), TmwAthena::Network::dispatchMessages(), ChatWindow::doPresent(), WindowManager::doResizeVideo(), AvatarListBox::draw(), TestMain::exec(), LocalPlayer::fixPos(), Setup_Input::fixTranslation(), formatUnit(), KillStats::gainXp(), Client::gameInit(), ItemPopup::getCardsString(), GameModifiers::getCrazyMoveTypeString(), ChatLogger::getDir(), PoParser::getFileName(), KeyboardConfig::getKeyName(), InputManager::getKeyStringLong(), ItemInfo::getLink(), MailWindow::getMailHeader(), ItemPopup::getOptionsString(), LocalPlayer::getPingTime(), SocialFriendsTab::getPlayersAvatars(), SocialPlayersTab::getPlayersAvatars(), GameModifiers::getQuickDropCounterString(), Loader::getRescaled(), StatsPageBasic::getStatsStr(), ShopWindow::giveList(), ItemLinkHandler::handleCommandLink(), BuyDialog::init(), Dirs::initConfigDir(), Dirs::initLocalDataDir(), Dirs::initScreenshotDir(), ConfigManager::initServerConfig(), ActorSprite::initTargetCursor(), Dirs::initTempDir(), WindowManager::initTitle(), TradeWindow::initTrade(), Dirs::initUpdatesDir(), Dirs::initUsersDir(), InsertCardDialog::InsertCardDialog(), SocialGuildTab::invite(), SocialPartyTab::invite(), KillStats::KillStats(), SocialGuildTab::leave(), SocialPartyTab::leave(), CharDB::load(), Theme::load(), DidYouKnowWindow::loadFile(), ChatLogger::loadLast(), UpdaterWindow::loadPatch(), loadQuest(), ServerDialog::loadServers(), SkillDialog::loadSkill(), SkillDialog::loadSkillData(), loadUnit(), SkillDialog::loadXmlFile(), ChatLogger::log(), Logger::log_r(), EventsManager::logEvent(), MapDebugTab::logic(), NetDebugTab::logic(), StatDebugTab::logic(), TargetDebugTab::logic(), ServerDialog::logic(), UpdaterWindow::logic(), MailViewWindow::MailViewWindow(), MapDebugTab::MapDebugTab(), Ea::ChatHandler::me(), CharacterDisplay::mouseMoved(), EmoteShortcutContainer::mouseMoved(), WindowMenu::mouseMoved(), InventoryWindow::mouseMoved(), MiniStatusWindow::mouseMoved(), NotifyManager::notify(), EAthena::AdminHandler::npcMove(), Joystick::open(), DialogsManager::openErrorDialog(), LocalPlayer::pickedUp(), SellDialog::postInit(), WhoIsOnline::prepareNick(), MemoryManager::printAllMemory(), ActorManager::printBeingsToChat(), printVersion(), EAthena::FamilyRecv::processAskForChild(), EAthena::ChatRecv::processColorChat(), EAthena::ChatRecv::processFormatColor(), EAthena::ChatRecv::processFormatMessage(), EAthena::ChatRecv::processFormatMessageNumber(), EAthena::ChatRecv::processFormatMessageSkill(), EAthena::ChatRecv::processFormatMessageString(), EAthena::ChatRecv::processFormatMessageStringColor(), EAthena::GuildRecv::processGuildBasicInfo(), EAthena::HomunculusRecv::processHomunculusFood(), EAthena::ChatRecv::processJoinChannel(), EAthena::PlayerRecv::processKilledBy(), Ea::LoginRecv::processLoginError(), EAthena::LoginRecv::processLoginError2(), EAthena::MailRecv::processNewMail(), EAthena::InventoryRecv::processPlayerItemRentalTime(), EAthena::VendingRecv::processReport(), ShopWindow::processRequest(), EAthena::SkillRecv::processSkillFailed(), Ea::TradeRecv::processTradeRequestContinue(), Ea::TradeRecv::processTradeResponseContinue(), TmwAthena::ChatRecv::processWhisperContinue(), EAthena::ChatRecv::processWhisperResponse(), Ea::ChatRecv::processWhisperResponseContinue(), Net::MessageIn::readBytes(), readField(), Net::MessageIn::readFloat(), readOptionFields(), Setup_Input::refreshAssignedKey(), MailViewWindow::removeMoney(), replaceItemLinks(), AvatarListBox::safeDraw(), SpellManager::save(), Map::saveExtraLayer(), ShopWindow::saveList(), Game::saveScreenshot(), HelpWindow::search(), NpcSellDialog::sellAction(), TmwAthena::BuySellHandler::sendBuyRequest(), TmwAthena::BuySellHandler::sendSellRequest(), LocalPlayer::setAction(), LocalPlayer::setFollow(), LocalPlayer::setImitate(), ItemPopup::setItem(), StatusPopup::setLabelText(), TradeWindow::setMoney(), OnlinePlayer::setText(), Setup_Touch::Setup_Touch(), GraphicsManager::setVideoMode(), CharacterViewSmall::show(), BeingPopup::show(), SkillPopup::show(), PopupMenu::showChangePos(), PopupMenu::showChatPopup(), PopupMenu::showCraftPopup(), OutfitWindow::showCurrentOutfit(), SocialWindow::showGuildInvite(), PopupMenu::showMuteCommands(), ChatTab::showOnline(), SocialWindow::showPartyInvite(), PopupMenu::showPlayerMenu(), PopupMenu::showPlayerPopup(), PopupMenu::showPopup(), QuestsWindow::showQuest(), PopupMenu::showSkillLevelPopup(), PopupMenu::showSkillOffsetPopup(), PopupMenu::showSkillTypePopup(), Being::showTeamBadge(), PopupMenu::showWindowsPopup(), EAthena::AdminHandler::slide(), InventoryWindow::slotsChanged(), StatDebugTab::StatDebugTab(), StatsPageBasic::StatsPageBasic(), StatusWindow::StatusWindow(), InputManager::store(), stringToHexPath(), Being::takeDamage(), TmwAthena::ChatHandler::talkPet(), textToMe(), timeDiffToString(), SkillInfo::toDataStr(), toString(), Logger::unimplemented(), AttrDisplay::update(), KillStats::update(), SkillDialog::update(), UserAgent::update(), SkillInfo::update(), SellDialog::updateButtonsAndLabels(), BuyDialog::updateButtonsAndLabels(), InfoClanTab::updateClan(), StatusWindow::updateInvSlotsBar(), InputManager::updateKeyString(), StatusWindow::updateLevelLabel(), SocialNavigationTab::updateList(), SocialNavigationTab::updateNames(), StatusWindow::updateProgressBar(), ShopWindow::updateShopName(), CharCreateDialog::updateSliders(), WindowManager::updateTitle(), InventoryWindow::updateWeight(), StatusWindow::updateWeightBar(), Actions::uploadUpdate(), UserPalette::UserPalette(), SkillDialog::useSkillDefault(), SkillDialog::useSkillPosition(), SkillDialog::useSkillTarget(), TmwAthena::AdminHandler::warp(), Net::MessageOut::writeCoordinates(), and Net::MessageOut::writeFloat().
bool strStartWith | ( | const std::string & | str, |
const std::string & | start | ||
) |
Definition at line 724 of file stringutils.cpp.
Referenced by Setup_Input::action(), ServerInfoWindow::addServerComment(), HelpWindow::handleLink(), ServerInfoWindow::handleLink(), ItemLinkHandler::handleLink(), UpdaterWindow::loadManaPlusUpdates(), UpdaterWindow::loadMods(), parseNumber(), TmwAthena::ChatRecv::processWhisperContinue(), PoParser::readLine(), PoParser::readMsgId(), PoParser::readMsgStr(), BrowserBoxTools::replaceLinkCommands(), UpdaterWindow::unloadManaPlusUpdates(), and XML::Document::validateXml().
std::string timeDiffToString | ( | int | timeDiff | ) |
Definition at line 955 of file stringutils.cpp.
References N_, and strprintf().
Referenced by EAthena::InventoryRecv::processPlayerItemRentalTime(), and QuestsWindow::showQuest().
std::string timeToStr | ( | const uint32_t | time | ) |
Definition at line 945 of file stringutils.cpp.
Referenced by EAthena::MailRecv::processMailList(), EAthena::Mail2Recv::processMailListPage(), and EAthena::MailRecv::processReadMail().
std::string& toLower | ( | std::string & | str | ) |
Converts the given string to lower case.
str | the string to convert to lower case |
Definition at line 66 of file stringutils.cpp.
Referenced by findI(), findSameSubstringI(), getBoolFromString(), normalize(), and parseBoolean().
std::string toString | ( | const double | num | ) |
Definition at line 854 of file stringutils.cpp.
References strprintf().
std::string toString | ( | const float | num | ) |
Definition at line 849 of file stringutils.cpp.
References strprintf().
std::string toString | ( | int32_t | num | ) |
std::string toString | ( | uint16_t | num | ) |
std::string toString | ( | uint32_t | num | ) |
Converts the given value to a string.
num | the value to convert to a string |
Definition at line 785 of file stringutils.cpp.
References CAST_8.
std::string toString | ( | uint64_t | num | ) |
std::string toString | ( | unsigned char | num | ) |
std::string toStringPrint | ( | const unsigned int | val | ) |
Definition at line 777 of file stringutils.cpp.
Referenced by Net::MessageIn::readInt16(), Net::MessageIn::readInt32(), Net::MessageIn::readInt64(), Net::MessageIn::readInt8(), Net::MessageIn::readUInt16(), Net::MessageIn::readUInt32(), Net::MessageIn::readUInt8(), Net::MessageOut::writeInt16(), Net::MessageOut::writeInt32(), Net::MessageOut::writeInt64(), and Net::MessageOut::writeInt8().
std::string& toUpper | ( | std::string & | str | ) |
Converts the given string to upper case.
str | the string to convert to upper case |
Definition at line 72 of file stringutils.cpp.
std::string& trim | ( | std::string & | str | ) |
Trims spaces off the end and the beginning of the given string.
str | the string to trim spaces off |
Definition at line 47 of file stringutils.cpp.
Referenced by getBoolFromString(), normalize(), parseBoolean(), replaceItemLinks(), splitToIntVector(), splitToStringSet(), and splitToStringVector().
std::list<std::string> unpackList | ( | const std::string & | str | ) |
Definition at line 605 of file stringutils.cpp.
References splitToStringList().
std::string urlJoin | ( | std::string | str1, |
const std::string & | str2 | ||
) |