Sign in

    fuzzy_match

    A library for fuzzy string matching and fuzzy string searching

    fuzzy_match
    fuzzy_search
    string
    Download zip
    Version
    0.2.5
    License
    Apache-2.0
    Last updated
    11 months ago
    Downloads
    207

    No dependencies

    #illusory0x0/fuzzy_match

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

    StringLike

    pub(open) trait StringLike {
    length(Self) -> Int
    op_get(Self, Int) -> Char
    is_empty(Self) -> Bool = _
    to_string(Self) -> String
    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