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
7namespace nngn {
8
9inline QString qstring_from_view(std::string_view v) {
10 return QString::fromUtf8(v.data(), static_cast<int>(v.size()));
11}
12
13}
14
15namespace nngn::literals {
16
17inline auto operator""_qs(const char *p, std::size_t n) {
18 return QString::fromUtf8(p, static_cast<int>(n));
19}
20
21inline 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
local n
Definition dump_lights.lua:5
Definition literals.h:9
Definition audio.cpp:7
QString qstring_from_view(std::string_view v)
Definition utils.h:9
v[1]
Definition math.lua:22