⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
userver
C++ Async Framework v2.0
Documentation
API Groups
Namespaces
Reference
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
y
Variables
k
n
r
u
w
Typedefs
c
d
h
m
n
o
p
s
t
u
v
Enumerations
a
b
c
d
f
h
i
l
o
p
r
s
t
u
v
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Symbols
File List
File Members
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
regex.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/utils/regex.hpp
4
/// @brief @copybrief utils::regex
5
6
#
include
<
string
>
7
8
#
include
<
userver
/
utils
/
fast_pimpl
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
utils {
13
14
/// @ingroup userver_universal userver_containers
15
///
16
/// @brief Small alias for boost::regex / std::regex without huge includes
17
class
regex
final
{
18
public
:
19
regex();
20
explicit
regex(std::string_view pattern);
21
22
~regex();
23
24
regex(
const
regex&);
25
regex(regex&&)
noexcept
;
26
27
regex& operator=(
const
regex&);
28
regex& operator=(regex&&)
noexcept
;
29
30
std::string str()
const
;
31
32
private
:
33
struct
Impl;
34
utils::FastPimpl<Impl, 16, 8> impl_;
35
36
friend
bool
regex_match
(std::string_view str,
const
regex& pattern);
37
friend
bool
regex_search
(std::string_view str,
const
regex& pattern);
38
friend
std::string
regex_replace
(std::string_view str,
const
regex& pattern,
39
std::string_view repl);
40
};
41
42
/// @brief Determines whether the regular expression matches the entire target
43
/// character sequence
44
bool
regex_match
(std::string_view str,
const
regex& pattern);
45
46
/// @brief Determines whether the regular expression matches anywhere in the
47
/// target character sequence
48
bool
regex_search
(std::string_view str,
const
regex& pattern);
49
50
/// @brief Create a new string where all regular expression matches replaced
51
/// with repl
52
std::string
regex_replace
(std::string_view str,
const
regex& pattern,
53
std::string_view repl);
54
55
}
// namespace utils
56
57
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
utils
regex.hpp
Generated on Wed May 15 2024 22:35:19 for userver by
Doxygen
1.10.0