class EE::System::PatternMatcher

#include <patternmatcher.hpp>

class PatternMatcher {
public:
    // enums

    enum PatternType;

    // structs

    struct Range;

    // classes

    class Match;
    class State;

    // construction

    PatternMatcher(PatternType type);
    virtual ~PatternMatcher();

    // methods

    PatternType getType() const;
    PatternMatcher::Match gmatch(const char* s);
    PatternMatcher::Match gmatch(const char* s);
    PatternMatcher::Match gmatch(const std::string& string);
    PatternMatcher::Match gmatch(const std::string& string);
    bool range(int indexGet, int& startMatch, int& endMatch, PatternMatcher::Range* returnedMatched) const;
    bool find(const std::string& s, int& startMatch, int& endMatch, int offset = 0, int returnedMatchIndex = 0) const;
    bool find(const char* stringSearch, int& startMatch, int& endMatch, int stringStartOffset = 0, int stringLength = 0, int returnMatchIndex = 0) const;
    std::string gsub(const char* text, const char* replace);
    std::string gsub(const std::string& text, const std::string& replace);
    virtual const std::string_view& getPattern() const = 0;
    virtual bool matches(const char* stringSearch, int stringStartOffset, PatternMatcher::Range* matchList, size_t stringLength) const = 0;
    virtual bool matches(const std::string& str, PatternMatcher::Range* matchList = nullptr, int stringStartOffset = 0) const = 0;
    virtual const size_t& getNumMatches() const = 0;
    virtual bool isValid() const = 0;
};