#include "ChatManager.h"
#include "NetworkManager.h"
#include "PeerLink.h"
#include "Serializer.h"
#include "Logger.h"
#include <algorithm>
#include <cctype>
#include <cstring>
#include <fstream>
#include <random>
#include <cstdint>
#include <unordered_map>
#include "PathManager.h"
Go to the source code of this file.
◆ ends_with_icase()
| static bool ends_with_icase |
( |
const std::string & | a, |
|
|
const char * | suf ) |
|
static |
Definition at line 21 of file ChatManager.cpp.
22{
23 const size_t n = std::strlen(suf);
24 if (a.size() < n)
25 return false;
26 return std::equal(a.end() - n, a.end(), suf, suf + n, [](char c1, char c2)
27 { return (char)std::tolower((unsigned char)c1) == (char)std::tolower((unsigned char)c2); });
28}