KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
Loading...
Searching...
No Matches
StringUtil::Levenshtein Class Reference

Implements the Levenshtein algorithm to determine the distance between two strings. More...

#include <stringutil.h>

Public Member Functions

 Levenshtein (const QString &s1, const QString &s2)
 Construct a Levenshtein calculator and compute the distance.
 
int distance () const
 Return the computed Levenshtein distance.
 

Detailed Description

Implements the Levenshtein algorithm to determine the distance between two strings.

Definition at line 256 of file stringutil.h.

Constructor & Destructor Documentation

◆ Levenshtein()

StringUtil::Levenshtein::Levenshtein ( const QString &  s1,
const QString &  s2 
)

Construct a Levenshtein calculator and compute the distance.

Parameters
s1First string
s2Second string

Member Function Documentation

◆ distance()

int StringUtil::Levenshtein::distance ( ) const
inline

Return the computed Levenshtein distance.

Returns
Edit distance

Definition at line 270 of file stringutil.h.


The documentation for this class was generated from the following file: