# LEVENSHTEIN

### Description

`LEVENSHTEIN` calculates the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) between two strings — that is, the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one string into the other.

This is useful for fuzzy matching, detecting typos, or comparing how similar two strings are.

### Example

```
LEVENSHTEIN("lewenstein", "levenshtein")
```

This returns `2`, because two edits are needed to transform `"lewenstein"` into `"levenshtein"`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.atfinity.io/rule-language/operators/string-operators/levenshtein.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
