pcre.hpp

来自「内存管理工具Exmap。该工具比 ps 或 top 更精确」· HPP 代码 · 共 36 行

HPP
36
字号
#ifndef _PCRE_HPP#define _PCRE_HPP#include <string>#include <list>#include <pcre.h>namespace Pcre{    class Regexp    {    public:	Regexp();	~Regexp();	bool compile(const std::string &patten);	bool matches(const std::string &s);	bool match_capture(const std::string &s,			   std::list<std::string> &captures);	/// Modifies the list!	void grep(std::list<std::string> &lines);    private:	void pcre_check_free();	Regexp(const Regexp &other);	const Regexp &operator=(const Regexp &other);	pcre *_regexp;	int _num_captures;	std::string _lasterr;	int _lasterroffset;    };};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?