Skip to main content
Scalar function
Returns NULL when either string or a supplied threshold is NULL.

Syntax

Scalar

Arguments

Returns

  • Type: INT
  • Possible values: A nonnegative edit distance, or -1 when the distance exceeds threshold.
  • NULL behavior: Returns NULL when either string or a supplied threshold is NULL.

Properties

Usage notes

  • Insertion, deletion and substitution each cost one edit. Distances count Unicode code points.
  • A negative threshold causes a non-NULL input pair to return -1.

Examples

Typical behavior

Empty and identical strings

Last modified on October 15, 2026