regex/error
src/regex/error.tur
defn
regex-error-message
(regex-error-message [code :int] :cstr)
convert a PCRE2 error code to a human-readable string.
Parameters
| code | negative PCRE2 error code (e.g. PCRE2_ERROR_NOMATCH = -1) |
Returns
:cstr -- human-readable error message (caller-owned malloc'd copy)
Example
(println (regex-error-message -1)) ; "no match"
Since: P6