rodecomp/Source/Contents/ForbiddenWords.h
2026-10-24 00:35:19 +00:00

22 lines
641 B
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_FORBIDDENWORDS_H
#define RAGNAROK_SOURCE_CONTENTS_FORBIDDENWORDS_H
#include <string>
#include <vector>
class CCommonObject;
class ResourceBytes;
// Borrowed pointer vector and charset owner. Words are
// already normalized by their resource loader; this operation does not own them.
struct ForbiddenWords {
std::vector<const char*>& words;
const unsigned short& codePage;
bool Load(const char* name, CCommonObject& storage, ResourceBytes& file);
bool Allows(const char* text) const;
bool Contains(const char* text) const;
void Mask(char* text, std::string* value = nullptr) const;
};
#endif