Skip to content

Fuzzy 0.4.0 extractresult

github-actions[bot] edited this page Aug 21, 2026 · 1 revision

Lodestar.Fuzzy 0.4.0. This page is frozen at that release. Read the current documentation for what main says now. A link to a decision or a migration page follows main, and leaves the archive.

ExtractResult

One candidate's choice, score and index.

public readonly record struct ExtractResult

PropertiesChoice is the candidate string, Score its similarity in [0, 100], and Index its position in the list that was searched.

Example — the best of several candidates, traced back to its row.

using Lodestar.Fuzzy;

string[] choices = ["apple pie", "apple tart", "banana bread", "cherry pie"];

ExtractResult? best = Process.ExtractOne("appel pie", choices);

string choice = best?.Choice;  // => apple pie
int index = best?.Index ?? -1;  // => 0

RemarksIndex is what makes the result usable. Candidates usually come from a list of records rather than a list of strings, and the score alone cannot say which record matched — matching the string back by value fails the moment two records share one.

A readonly record struct, so it is copied rather than referenced and compares by value.

Applies to — net10.0, netstandard2.0.

See alsoProcess.Extract, Process.ExtractOne.

Lodestar

Project

Clone this wiki locally