-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRegexUtils.h
More file actions
24 lines (17 loc) · 919 Bytes
/
Copy pathRegexUtils.h
File metadata and controls
24 lines (17 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#include <vector>
NS_BEGIN
// Returns true if even a partial match of pattern inside the target string
bool RegexSearch8(PCSTR szTarget, PCSTR szRegexPattern, const bool bCaseInsensitive = true, std::vector<CStr8> *pvecResults = nullptr);
bool RegexSearchW(PCWSTR szTarget, PCWSTR szRegexPattern, const bool bCaseInsensitive = true, std::vector<CStrW> *pvecResults = nullptr);
// Returns true if the entire pattern matches the target string
bool RegexMatch8(PCSTR szTarget, PCSTR szRegexPattern, const bool bCaseInsensitive = true, std::vector<CStr8> *pvecResults = nullptr);
bool RegexMatchW(PCWSTR szTarget, PCWSTR szRegexPattern, const bool bCaseInsensitive = true, std::vector<CStrW> *pvecResults = nullptr);
#ifdef _WIN32
#define RegexSearch RegexSearchW
#define RegexMatch RegexMatchW
#else
#define RegexSearch RegexSearch8
#define RegexMatch RegexMatch8
#endif
NS_END