z_function
Computes the Z-function of a string and optionally searches for a pattern, enabling efficient string matching and prefix analysis.
Instructions
Compute Z-function of a string with optional pattern matching.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Input string to compute Z-function for | |
| pattern | No | Optional pattern to search for in text |