QGIS API Documentation  2.12.0-Lyon
qgsstringutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsstringutils.h
3  ----------------
4  begin : June 2015
5  copyright : (C) 2015 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #include <QString>
17 
18 #ifndef QGSSTRINGUTILS_H
19 #define QGSSTRINGUTILS_H
20 
27 class CORE_EXPORT QgsStringUtils
28 {
29  public:
30 
39  static int levenshteinDistance( const QString &string1, const QString &string2, bool caseSensitive = false );
40 
49  static QString longestCommonSubstring( const QString &string1, const QString &string2, bool caseSensitive = false );
50 
59  static int hammingDistance( const QString &string1, const QString &string2, bool caseSensitive = false );
60 
66  static QString soundex( const QString &string );
67 };
68 
69 #endif //QGSSTRINGUTILS_H
Utility functions for working with strings.