|
static List< int > | AutoCompleteText (string input, string[] source, int maxShownCount=5, float levenshteinDistance=0.5f) |
| A textField to popup a matching popup, based on developers input values. More...
|
|
static int | LevenshteinDistance< T > (IEnumerable< T > lhs, IEnumerable< T > rhs) |
| Computes the Levenshtein Edit Distance between two enumerables. More...
|
|
|
TMP_InputField | inf |
|
RawImage | img |
|
◆ AutoCompleteText()
static List<int> Autocompletion.AutoCompleteText |
( |
string |
input, |
|
|
string [] |
source, |
|
|
int |
maxShownCount = 5 , |
|
|
float |
levenshteinDistance = 0.5f |
|
) |
| |
|
static |
A textField to popup a matching popup, based on developers input values.
- Parameters
-
input | string input. |
source | the data of all possible values (string). |
maxShownCount | the amount to display result. |
levenshteinDistance | value between 0f ~ 1f,
- more then 0f will enable the fuzzy matching
- 1f = anything thing is okay.
- 0f = require full match to the reference
- recommend 0.4f ~ 0.7f
|
- Returns
- A list of compatible string ids in source.
◆ LevenshteinDistance< T >()
static int Autocompletion.LevenshteinDistance< T > |
( |
IEnumerable< T > |
lhs, |
|
|
IEnumerable< T > |
rhs |
|
) |
| |
|
static |
Computes the Levenshtein Edit Distance between two enumerables.
- Template Parameters
-
T | The type of the items in the enumerables. |
- Parameters
-
lhs | The first enumerable. |
rhs | The second enumerable. |
- Returns
- The edit distance.
https://blogs.msdn.microsoft.com/toub/2006/05/05/generic-levenshtein-edit-distance-with-c/
◆ img
RawImage Autocompletion.img |
◆ inf
TMP_InputField Autocompletion.inf |
The documentation for this class was generated from the following file: