nngn
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1
#ifndef NNGN_TOOLS_UTILS_H
2
#define NNGN_TOOLS_UTILS_H
3
4
#include <QRegularExpression>
5
#include <QStringView>
6
7
namespace
nngn
{
8
9
inline
QString
qstring_from_view
(std::string_view
v
) {
10
return
QString::fromUtf8(
v
.data(),
static_cast<
int
>
(
v
.size()));
11
}
12
13
}
14
15
namespace
nngn::literals
{
16
17
inline
auto
operator
""
_qs(
const
char
*p, std::size_t
n
) {
18
return
QString::fromUtf8(p,
static_cast<
int
>
(
n
));
19
}
20
21
inline
auto
operator
""
_qre(
const
char
*p, std::size_t
n
) {
22
return
QRegularExpression(QString::fromUtf8(p,
static_cast<
int
>
(
n
)));
23
}
24
25
}
26
27
#endif
n
local n
Definition
dump_lights.lua:5
nngn::literals
Definition
literals.h:9
nngn
Definition
audio.cpp:7
nngn::qstring_from_view
QString qstring_from_view(std::string_view v)
Definition
utils.h:9
v
v[1]
Definition
math.lua:22
tools
utils.h
Generated by
1.11.0