Marble

MarblePlacemarkModel_P.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2006-2007 Torsten Rahn <[email protected]>
4 //
5 
6 #ifndef MARBLE_MARBLEPLACEMARKMODEL_P_H
7 #define MARBLE_MARBLEPLACEMARKMODEL_P_H
8 
9 #include <QChar>
10 #include <QRegExp>
11 #include <QString>
12 
13 namespace Marble
14 {
15 
16 namespace GeoString
17 {
18  static const QRegExp combiningDiacriticalMarks("[\\x0300-\\x036F]+");
19 
20  QString deaccent( const QString& accentString )
21  {
22  QString result;
23 
24  result = accentString.normalized( QString::NormalizationForm_D ).remove( combiningDiacriticalMarks );
25  result.replace(QChar(0x00F8), QLatin1Char('o'));
26  result.replace(QChar(0x0142), QLatin1Char('l'));
27  return result;
28  }
29 }
30 }
31 
32 #endif
NormalizationForm_D
QString normalized(QString::NormalizationForm mode, QChar::UnicodeVersion version) const const
Binds a QML item to a specific geodetic location in screen coordinates.
QString & replace(int position, int n, QChar after)
QString & remove(int position, int n)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.