diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-16 15:12:54 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-16 15:12:54 -0400 |
| commit | 6d0f04375df942985292d0a6b6e487db9a09f3fa (patch) | |
| tree | cad6fbb4008240cf7280b77fa226f9518f44faac /environment.c | |
| parent | a9a21c40d91ea75066023854739c6a98a36c8a76 (diff) | |
Have Text:matches() return an optional array of matches
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/environment.c b/environment.c index d3e27069..228c5ac4 100644 --- a/environment.c +++ b/environment.c @@ -294,7 +294,7 @@ env_t *new_compilation_unit(CORD *libname) // Text methods: {"ends_with", "Text$ends_with", "func(path:Path, suffix:Text)->Bool"}, {"has", "Text$has", "func(path:Path, pattern:Pattern)->Bool"}, - {"matches", "Text$matches", "func(path:Path, pattern:Pattern)->Bool"}, + {"matches", "Text$matches", "func(path:Path, pattern:Pattern)->[Text]?"}, {"replace", "Text$replace", "func(path:Path, pattern:Pattern, replacement:Text, backref=$/\\/, recursive=yes)->Path"}, {"replace_all", "Text$replace_all", "func(path:Path, replacements:{Pattern:Text}, backref=$/\\/, recursive=yes)->Path"}, {"starts_with", "Text$starts_with", "func(path:Path, prefix:Text)->Bool"}, @@ -320,7 +320,7 @@ env_t *new_compilation_unit(CORD *libname) {"lines", "Text$lines", "func(text:Text)->[Text]"}, {"lower", "Text$lower", "func(text:Text)->Text"}, {"map", "Text$map", "func(text:Text, pattern:Pattern, fn:func(text:Text)->Text)->Text"}, - {"matches", "Text$matches", "func(text:Text, pattern:Pattern)->Bool"}, + {"matches", "Text$matches", "func(text:Text, pattern:Pattern)->[Text]?"}, {"quoted", "Text$quoted", "func(text:Text, color=no)->Text"}, {"repeat", "Text$repeat", "func(text:Text, count:Int)->Text"}, {"replace", "Text$replace", "func(text:Text, pattern:Pattern, replacement:Text, backref=$/\\/, recursive=yes)->Text"}, |
