fuzzy_match

A library for fuzzy string matching and fuzzy string searching

fuzzy_match
fuzzy_search
string
moon add moonbit-community/fuzzy_match@0.2.6
Download zip
Version
0.2.6
License
Apache-2.0
Last updated
7 days ago
Downloads
11K
README

#illusory0x0/fuzzy_match

A library for fuzzy string matching and fuzzy string searching adapted from janestreet/fuzzy_match

#
StringLike

pub(open) trait StringLike {
fn length(Self) -> Int
fn op_get(Self, Int) -> Char
fn is_empty(Self) -> Bool = _
fn to_string(Self) -> String
fn view(Self, Int, Int) -> StringView
}

#
Query

type Query

#
Query::matching_indices

fn[Item : StringLike] Query::matching_indices(self : Query, item~ : Item) -> Array[Int]?

#
Query::new

fn Query::new(query : String) -> Query

#
Query::score

fn[Item : StringLike] Query::score(self : Query, item~ : Item) -> Int

#
Query::search

fn[Item : StringLike + Compare + Eq] Query::search(self : Query, items~ : Array[Item]) -> Array[StringView]

fuzzy_search

This implementation refers to Ocaml janestreet fuzzy_match

#
Query::split_by_matching_sections

fn[Item : StringLike] Query::split_by_matching_sections(self : Query, item~ : Item) -> Array[(Bool, StringView)]?

#
is_match

fn[Pattern : StringLike, Text : StringLike] is_match(char_equal? : (Char, Char) -> Bool, pattern~ : Pattern, text~ : Text) -> Bool

fuzzy match

This implementation refers to Ocaml janestreet fuzzy_match

#
score_upper_bound

fn score_upper_bound(query_length~ : Int) -> Int

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io