summaryrefslogtreecommitdiffstats
path: root/src/Util.hpp
blob: ffd2fa38132899b9c89e16c4ab94385ddf55e30a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once

#include <QString>
#include <QMap>

namespace Util {
    static const QMap<QChar, QChar> unescapeChars {
        {'n', '\n'},
    };

    QString trimQuotes(QString string, bool& trimmed);
    QString unescape(const QString& string, const QChar escapeChar = '\\');
    QString escape(const QString& string, const QChar escapeChar = '\\', const QString& escapeChars = "");
}