nngn
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
v
w
z
Typedefs
a
d
f
h
i
m
s
t
u
v
w
z
Enumerations
Enumerator
Concepts
Classes
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
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
k
m
o
p
q
r
s
t
u
v
Enumerations
a
b
c
d
e
f
l
m
o
p
r
s
t
Enumerator
a
b
c
d
e
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Typedefs
Enumerations
Macros
c
d
e
f
g
l
n
p
s
t
x
▼
nngn
Documentation
►
Building
►
Namespaces
►
Concepts
►
Classes
▼
Files
▼
File List
►
demos
►
maps
▼
src
►
audio
►
collision
►
compute
►
font
►
glsl
►
graphics
►
input
►
lson
►
lua
►
math
►
os
►
render
►
timing
▼
utils
►
alloc
►
concepts
concepts.cpp
►
concepts.h
►
def.h
►
delegate.h
fixed_string.cpp
►
fixed_string.h
flags.cpp
►
flags.h
fn.cpp
►
fn.h
literals.cpp
►
literals.h
►
log.cpp
►
log.h
►
macros.h
►
pointer_flag.h
►
pp.cpp
►
pp.h
ranges.cpp
►
ranges.h
regexp.cpp
►
regexp.h
►
scoped.h
span.cpp
►
span.h
►
static_vector.h
string.cpp
►
string.h
tuple.cpp
►
tuple.h
types.cpp
►
types.h
►
utils.cpp
►
utils.h
►
const.h
►
debug.h
►
entity.cpp
►
entity.h
lua_entity.cpp
►
main.cpp
►
tests
►
tools
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
regexp.h
Go to the documentation of this file.
1
#ifndef NNGN_UTILS_REGEXP_H
2
#define NNGN_UTILS_REGEXP_H
3
4
#include <regex>
5
6
namespace
nngn
{
7
8
inline
std::string
regexp_replace
(
9
std::string &&
s
,
const
std::regex &
r
,
const
char
*
fmt
)
10
{
11
const
auto
b =
begin
(
s
),
e
=
end
(
s
);
12
s
.erase(std::regex_replace(b, b,
e
,
r
,
fmt
),
e
);
13
return
std::move(
s
);
14
}
8
inline
std::string
regexp_replace
( {
…
}
15
16
inline
std::string
regexp_replace
(
17
std::string_view
s
,
const
std::regex &
r
,
const
char
*
fmt
)
18
{
19
return
regexp_replace
(std::string{
s
},
r
,
fmt
);
20
}
16
inline
std::string
regexp_replace
( {
…
}
21
22
}
23
24
#endif
end
function DEMO text end
Definition
demo0.lua:6
r
local r
Definition
gamma.lua:7
nngn
Definition
audio.cpp:7
nngn::begin
constexpr const R * begin(const T< R > &v)
Definition
vec.h:207
nngn::fmt
std::string fmt(auto &&...args)
Definition
string.h:11
nngn::regexp_replace
std::string regexp_replace(std::string &&s, const std::regex &r, const char *fmt)
Definition
regexp.h:8
e
local e
Definition
math.lua:4
s
std::chrono::seconds s
Definition
timing.cpp:6
src
utils
regexp.h
Generated by
1.11.0