RunicVTT Open Source Virtual Tabletop for TTRPG using P2P
Loading...
Searching...
No Matches
ChatManager.cpp File Reference
#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"
Include dependency graph for ChatManager.cpp:

Go to the source code of this file.

Functions

static bool ends_with_icase (const std::string &a, const char *suf)
 

Function Documentation

◆ 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}
Here is the caller graph for this function: