mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 08:35:52 -04:00
[General] Add vectorContains util for checking strings in vectors
This commit is contained in:
parent
84af9d9999
commit
c7f10892a9
@ -90,6 +90,11 @@ bool Utils::vectorContains(std::vector<int>* vectorChecked, int value)
|
||||
return std::find(vectorChecked->begin(), vectorChecked->end(), value) != vectorChecked->end();
|
||||
}
|
||||
|
||||
bool Utils::vectorContains(std::vector<std::string>* vectorChecked, std::string value)
|
||||
{
|
||||
return std::find(vectorChecked->begin(), vectorChecked->end(), value) != vectorChecked->end();
|
||||
}
|
||||
|
||||
std::string Utils::toString(int num)
|
||||
{
|
||||
std::ostringstream stream;
|
||||
|
@ -28,6 +28,7 @@ namespace Utils
|
||||
bool compareDoubles(double a, double b, double epsilon);
|
||||
|
||||
bool vectorContains(std::vector<int>* vectorChecked, int value);
|
||||
bool vectorContains(std::vector<std::string>* vectorChecked, std::string value);
|
||||
|
||||
std::string replaceString(const std::string &source, const char *find, const char *replace);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user