4.26 GRegexEvalCallback

Callback: GRegexEvalCallback

A procedure given for it is called as (procedure match-info result) ⇒ %return.

Specifies the type of the function passed to regex:replace-eval. It is called for each occurrence of the pattern in the string passed to regex:replace-eval, and it should append the replacement to result.

match-info

Passed: a <GMatchInfo>.

the <GMatchInfo> generated by the match. Use match-info:get-regex and match-info:get-string if you need the <GRegex> or the matched string.

result

Passed: a <GString>.

a <GString> containing the new string

%return

Returned: a boolean.

#f to continue the replacement process, #t to stop it

user-data

Not passed: it is the user data that guile-gi supplied.

user data passed to regex:replace-eval