about summary refs log blame commit diff
path: root/src/libutil/regex.hh
blob: aa012b721cb78feaef85068bac3eb50202908060 (plain) (tree)





















                                   
#pragma once

#include "types.hh"

#include <sys/types.h>
#include <regex.h>

namespace nix {

class Regex
{
public:
    Regex(const string & pattern);
    ~Regex();
    bool matches(const string & s);

private:
    regex_t preg;
    string showError(int err);
};

}