samp.directory
← Scripts e bibliotecas

Southclaws/pawn-levenshtein

Levenshtein distance package for Pawn.

Biblioteca★ 5atualizado abr. de 2019MITPawnsampctlArquivado
Abrir no GitHub

O autor arquivou este repositório, então ele não é mais mantido.

Instalar com o sampctl

sampctl package install Southclaws/pawn-levenshtein

Execute na pasta do seu projeto. O sampctl baixa o pacote e as dependências dele.

Depende de 1 pacote

README.md

levenshtein.inc

https://en.wikipedia.org/wiki/Levenshtein_distance

Usage

Simply add to your pawn.json and include:

{
    "dependencies": ["ScavengeSurvive/levenshtein"]
}

The function levenshtein simply takes two strings and returns a score that indicates the difference.

#include <levenshtein>

main() {
    new difference = levenshtein("these strings are similar, but not the same", "these strings ar similar, but no the same");
    printf("%d", difference);
}

Testing

To test, simply run the package:

sampctl package run

Then connect to localhost:7777.

Esta página é montada com o que o GitHub publica sobre o repositório. O samp.directory não hospeda o código. Avisar de um problema com esta página