35 static std::shared_ptr<StringUtils> instance();
36 Q_INVOKABLE
int wordCount(QString str)
override;
37 Q_INVOKABLE
int charCount(QString str, QChar ch)
override;
38 Q_INVOKABLE QString word(QString str,
int id)
override;
39 Q_INVOKABLE QString wordAt(QString str,
int index)
override;
40 Q_INVOKABLE QString repeatString(QString
string,
int n)
override;
41 Q_INVOKABLE QList<QVariant> longestCommonSubsequence(QList<QVariant> source, QList<QVariant> target)
override;
42 Q_INVOKABLE QString longestCommonSubsequence(QString source, QString target)
override;
43 Q_INVOKABLE QString normalizeString(QString str)
override;
46 static std::shared_ptr<StringUtils> m_instance;
47 static int lcsLen(QList<QVariant> source, QList<QVariant> target);
48 static int lcsLen(QList<QVariant> source, QList<QVariant> target, QMap<
int, QMap<int, int>> *lcsTable);