Skip to content

A single header C++ library for compute edit distance (Levenshtein distance), supporting wstring ( and Chinese string).

License

Notifications You must be signed in to change notification settings

sean2077/editdis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

editdis

A single header C++ library for compute edit distance (Levenshtein distance), supporting wstring ( and Chinese string).

Usage

#include "editdis.hpp"

int main(int argc, const char** argv) {
    // support Chinese string
    int dis = editdis::edit_distance("浙B82D60", "闽B82060");
    std::cout << dis << std::endl;  // 2

    // support wstring
    dis = editdis::edit_distance(L"浙B82D60", L"闽B82060");
    std::cout << dis << std::endl;  // 2

    return 0;
}

About

A single header C++ library for compute edit distance (Levenshtein distance), supporting wstring ( and Chinese string).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published