mirror of
https://github.com/janet-lang/janet
synced 2025-11-19 00:35:11 +00:00
string and peg replacement functions can now take functions
Functions will be invoked with the matched text, and their result will be coerced to a string and used as the new replacement text. This also allows passing non-function, non-byteviewable values, which will be converted into strings during replacement (only once, and only if at least one match is found).
This commit is contained in:
@@ -93,6 +93,7 @@ void janet_buffer_format(
|
||||
Janet *argv);
|
||||
Janet janet_next_impl(Janet ds, Janet key, int is_interpreter);
|
||||
JanetBinding janet_binding_from_entry(Janet entry);
|
||||
JanetByteView janet_text_substitution(Janet *subst, const uint8_t *bytes, uint32_t len);
|
||||
|
||||
/* Registry functions */
|
||||
void janet_registry_put(
|
||||
|
||||
Reference in New Issue
Block a user