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

Implements BITAP algorithm for fuzzy search. More...

#include <stringutil.h>

Public Member Functions

 Bitap (const QString &haystack, const QString &needle, int maxDistance=1)
 Construct a Bitap fuzzy search and compute the result.
 
int index () const
 Return the index of the fuzzy match.
 

Detailed Description

Implements BITAP algorithm for fuzzy search.

Definition at line 226 of file stringutil.h.

Constructor & Destructor Documentation

◆ Bitap()

StringUtil::Bitap::Bitap ( const QString &  haystack,
const QString &  needle,
int  maxDistance = 1 
)

Construct a Bitap fuzzy search and compute the result.

Parameters
haystackString to search in
needlePattern to search for
maxDistanceMaximum allowed Levenshtein distance

Member Function Documentation

◆ index()

int StringUtil::Bitap::index ( ) const
inline

Return the index of the fuzzy match.

Returns
Match index, or -1 if no match was found

Definition at line 241 of file stringutil.h.


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