Sha256: 05a41d604946d11108838fd9608d5415dd827491b8ab32086cf1a7888bd16add
Contents?: true
Size: 384 Bytes
Versions: 221
Compression:
Stored size: 384 Bytes
Contents
function! Anagram(word, candidates) abort let fp = s:fingerprint(a:word) let matches = [] for cand in a:candidates if cand ==? a:word continue elseif s:fingerprint(cand) ==? fp let matches += [cand] endif endfor return sort(matches) endfunction function! s:fingerprint(word) abort return sort(reverse(split(tolower(a:word), '\zs'))) endfunction
Version data entries
221 entries across 221 versions & 1 rubygems