mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 18:13:48 +00:00
Merge branch 'master' into Playerbot
# Conflicts: # src/server/game/Guilds/Guild.cpp
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v3 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by the
|
||||
* Free Software Foundation; either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Banner.h"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v3 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by the
|
||||
* Free Software Foundation; either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef AZEROTHCORE_BANNER_H
|
||||
|
||||
@@ -64,5 +64,19 @@ std::string Acore::String::TrimRightInPlace(std::string& str)
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Util function to add a suffix char. Can be used to add a slash at the end of a path
|
||||
*
|
||||
* @param str String where to apply the suffix
|
||||
* @param suffix Character to add at the end of the str
|
||||
* @return std::string Suffixed string
|
||||
*/
|
||||
std::string Acore::String::AddSuffixIfNotExists(std::string str, const char suffix) {
|
||||
if (str.empty() || (str.at(str.length() - 1) != suffix))
|
||||
str.push_back(suffix);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// Template Trim
|
||||
template AC_COMMON_API std::string Acore::String::Trim<std::string>(const std::string& s, const std::locale& loc /*= std::locale()*/);
|
||||
|
||||
@@ -72,6 +72,8 @@ namespace Acore::String
|
||||
AC_COMMON_API Str Trim(const Str& s, const std::locale& loc = std::locale());
|
||||
|
||||
AC_COMMON_API std::string TrimRightInPlace(std::string& str);
|
||||
|
||||
AC_COMMON_API std::string AddSuffixIfNotExists(std::string str, const char suffix);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user