class EE::System::LuaPattern

#include <luapattern.hpp>

class LuaPattern: public EE::System::PatternMatcher {
public:
    // construction

    LuaPattern(const std::string_view& pattern);

    // methods

    static std::string_view getURLPattern();
    static std::string_view getURIPattern();
    static std::string matchesAny(const std::vector<std::string>& stringvec, const std::string_view& pattern);
    static std::string match(const std::string& string, const std::string_view& pattern);
    static Range firstMatch(const std::string& string, const std::string_view& pattern);
    static bool hasMatches(const std::string& string, const std::string_view& pattern);
    virtual bool matches(const char* stringSearch, int stringStartOffset, PatternMatcher::Range* matchList, size_t stringLength) const;
    virtual bool matches(const std::string& str, PatternMatcher::Range* matchList = nullptr, int stringStartOffset = 0) const;
    virtual const size_t& getNumMatches() const;
    virtual const std::string_view& getPattern() const;
    virtual bool isValid() const;
};

Inherited Members

public:
    // enums

    enum PatternType;

    // structs

    struct Range;

    // classes

    class Match;
    class State;

    // 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;