⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util.cpp

📁 LINUX 设计一个简单的二级文件系统
💻 CPP
字号:
#include <iostream>
#include "Util.h"
#include "deelx.h"
#include "string2"

Util::Util() {

}

Util::~Util() {

}

int Util::regTest(const char* reg, const char* str) {
	CRegexpT <char> regexp(reg);
    MatchResult result = regexp.MatchExact(str);
    return result.IsMatched();
}

Util u;

void Util::Find(const char* reg, std::string &cmd, std::string *$)
{
	CRegexpT <char> regexp(reg);
	MatchResult result = regexp.Match(cmd.c_str());
	int i = 0;
	while (result.IsMatched()) {
		$[i] = cmd.substr(result.GetStart(), result.GetEnd() - result.GetStart());
		result = regexp.Match(cmd.c_str(), result.GetEnd());
		i++;
	}
}

void Util::ReadLine(std::string &str)
{
	std::getline(std::cin, str);
}

⌨️ 快捷键说明

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