KItinerary::StringUtil
KItinerary::StringUtil Namespace Reference
Functions | |
QStringView | betterString (QStringView lhs, QStringView rhs) |
QString | clean (const QString &s) |
QString | normalize (QStringView str) |
float | prefixSimilarity (QStringView s1, QStringView s2) |
Detailed Description
String normalization and comparison utilities.
Function Documentation
◆ betterString()
QStringView KItinerary::StringUtil::betterString | ( | QStringView | lhs, |
QStringView | rhs | ||
) |
Assuming both sides are describing the same thing, this tries to find the "better" string.
That is, prefer the one that didn't lose casing/unicode/etc in previous processing.
Definition at line 60 of file stringutil.cpp.
◆ clean()
Cleans up extra white spaces and XML entities from s
.
Definition at line 117 of file stringutil.cpp.
◆ normalize()
QString KItinerary::StringUtil::normalize | ( | QStringView | str | ) |
Strips out diacritics and converts to case-folded form.
Definition at line 16 of file stringutil.cpp.
◆ prefixSimilarity()
float KItinerary::StringUtil::prefixSimilarity | ( | QStringView | s1, |
QStringView | s2 | ||
) |
Returns how much of the prefix of two given strings are equal, in relation to the longer of the two input strings.
Definition at line 97 of file stringutil.cpp.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Jun 28 2022 04:02:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Jun 28 2022 04:02:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.