Blueprint Function Library to calculate the approximate (or "fuzzy") similarity between strings.
More...
#include <FuzzyStringLibrary.h>
Inherits UBlueprintFunctionLibrary.
|
| static void | CalcFuzzyStringSimilarity (const FString &A, const FString &B, float &Similarity, const EStringSimilarityMethods SimilarityMethod=EStringSimilarityMethods::WeightedRatio, bool bIgnoreCase=true, bool bNormalizeWhitespace=true) |
| | Calculate the fuzzy string similarity with one of the specified methods. More...
|
| |
| static void | RetrieveMostSimilarString (const FString &Query, const TArray< FString > &Strings, FString &BestMatch, float &Similarity, const EStringSimilarityMethods SimilarityMethod=EStringSimilarityMethods::WeightedRatio, bool bIgnoreCase=true, bool bNormalizeWhitespace=true) |
| | Retrieve the most similar string from an array of strings. More...
|
| |
| static void | RetrieveSortedSimilarStrings (const FString &Query, const TArray< FString > &Strings, TArray< FStringSimiliarity > &SortedMatches, const EStringSimilarityMethods SimilarityMethod=EStringSimilarityMethods::WeightedRatio, bool bIgnoreCase=true, bool bNormalizeWhitespace=true) |
| | Sort all strings in an array by their similarity to the query string. More...
|
| |
Blueprint Function Library to calculate the approximate (or "fuzzy") similarity between strings.
◆ CalcFuzzyStringSimilarity()
Calculate the fuzzy string similarity with one of the specified methods.
- Parameters
-
| A | String A |
| B | String B to compare against A |
| Similarity | Score btween 0 and 100 |
| SimilarityMethod | Method to calculate the similarity, see enum description. |
| bIgnoreCase | Ignore upper / lower case differences, e.g. "A" = "a". Default is true. |
| bNormalizeWhitespace | Treat all consecutive whitespace as a single space, e.g. "A b" = "A b". Default is true. |
◆ RetrieveMostSimilarString()
Retrieve the most similar string from an array of strings.
- Parameters
-
| Query | The string to look for |
| Strings | All the string to compare query against |
| BestMatch | Most similar string to query from the Strings array |
| Similarity | Similarity Score from 0 to 100 for the best match |
| SimilarityMethod | The similarity method to use. |
| bIgnoreCase | Ignore upper / lower case differences, e.g. "A" = "a". Default is true. |
| bNormalizeWhitespace | Treat all consecutive whitespace as a single space, e.g. "A b" = "A b". Default is true. |
◆ RetrieveSortedSimilarStrings()
Sort all strings in an array by their similarity to the query string.
- Parameters
-
| Query | the string to look for |
| Strings | All the string to compare query against |
| SortedMatches | array of structs: string/similarity |
| SimilarityMethod | The similarity method to use. |
| bIgnoreCase | Ignore upper / lower case differences, e.g. "A" = "a". Default is true. |
| bNormalizeWhitespace | Treat all consecutive whitespace as a single space, e.g. "A b" = "A b". Default is true. |
The documentation for this class was generated from the following files: