Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
textutils.h File Reference

(d5ab51f3901fb0c1758108e78829c3f295edd4ad)

#include <QtCore/qstring.h>
Include dependency graph for textutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  TextUtils
 Pure string helpers with no dependencies on QDoc driver types.

Enumerations

enum class  TextUtils::AnchorSyntax { TextUtils::Html , TextUtils::Xml }

Functions

QString TextUtils::separator (qsizetype wordPosition, qsizetype numberOfWords)
QString TextUtils::comma (qsizetype wordPosition, qsizetype numberOfWords)
QString TextUtils::asAsciiPrintable (const QString &str)
 Returns an ASCII-printable representation of str, preserving alphanumeric (alnum) characters ([a-zA-Z0-9]) and hyphens, but replacing all other characters with hyphens unless this would result in multiple adjacent hyphens.
QString TextUtils::protect (const QString &string)
QString TextUtils::cleanAnchorRef (const QString &refref, AnchorSyntax syntax)
 Rewrites ref into an identifier that satisfies the syntax grammar of an HTML anchor or an xml:id.

Variables

static constexpr QLatin1StringView TextUtils::samp = "&amp;"_L1
static constexpr QLatin1StringView TextUtils::slt = "&lt;"_L1
static constexpr QLatin1StringView TextUtils::sgt = "&gt;"_L1
static constexpr QLatin1StringView TextUtils::squot = "&quot;"_L1