module Fzy

Extended Modules

Defined in:

fzy.cr

Constant Summary

SCORE_GAP_INNER = -0.01_f32
SCORE_GAP_LEADING = -0.005_f32
SCORE_GAP_TRAILING = -0.005_f32
SCORE_MATCH_CAPITAL = 0.7_f32
SCORE_MATCH_CONSECUTIVE = 1.0_f32
SCORE_MATCH_DOT = 0.6_f32
SCORE_MATCH_SLASH = 0.9_f32
SCORE_MATCH_WORD = 0.8_f32
SCORE_MAX = Float32::INFINITY
SCORE_MIN = -Float32::INFINITY
VERSION = "0.1.0"

Instance Method Summary

Instance Method Detail

def match?(needle : String, haystack : String) : Bool #

Returns true if needle matches haystack


[View source]
def positions(needle : String, haystack : String) : Array(Int32) #

[View source]
def score(needle : String, haystack : String) : Float32 #

Finds the score of needle for haystack.


[View source]
def search(needle : String, haystack : Array(String)) #

[View source]
def search(needle : String, haystack : PreparedHaystack) #

[View source]