DtkCore
DTK Core module
载入中...
搜索中...
未找到
dpinyin.h
1// SPDX-FileCopyrightText: 2017 - 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DPINYIN_H
6#define DPINYIN_H
7
8#include <dtkcore_global.h>
9
10#include <QHash>
11
12DCORE_BEGIN_NAMESPACE
13
14// without polyphonic support
15QString LIBDTKCORESHARED_EXPORT Chinese2Pinyin(const QString& words);
16
18enum ToneStyle {
19 TS_NoneTone,
20 TS_Tone,
21 TS_ToneNum,
22};
23
24// support polyphonic
25QStringList LIBDTKCORESHARED_EXPORT pinyin(const QString& words, ToneStyle ts = TS_Tone, bool *ok = nullptr);
26
27// support polyphonic
28QStringList LIBDTKCORESHARED_EXPORT firstLetters(const QString& words);
29
30DCORE_END_NAMESPACE
31
32#endif // DPINYIN_H