Compare commits

...

3 commits

Author SHA1 Message Date
Christian Hesse
349ebd5ad6 global-functions: $Grep: use length from variable 2026-02-23 08:57:02 +01:00
Christian Hesse
eecc8c6126 global-functions: $Grep: add comment on :deserialize 2026-02-23 08:57:02 +01:00
Christian Hesse
a3c815c2ca update list of contributors 2026-02-23 08:57:02 +01:00
2 changed files with 6 additions and 2 deletions

View file

@ -39,6 +39,7 @@ Add yourself to the list,
* Andrea Ruffini Perico
* Andrew Cox
* Benjamin Newman
* Christian Werner
* Christoph Boss (@Kampfwurst)
* Daniel Ziegenberg (@ziegenberg)
* Devin Dean (@dd2594gh)

View file

@ -726,11 +726,14 @@
}
:do {
:local Line [ :pick $Input 0 [ :find $Input "\n" ] ];
# Do *NOT* try :deserialize here to split lines. It can fail with
# scripts, and it *does* fail with global-functions!
:local Len [ :find $Input "\n" ];
:local Line [ :pick $Input 0 $Len ];
:if ([ :typeof [ :find $Line $Pattern ] ] = "num") do={
:return $Line;
}
:set Input [ :pick $Input ([ :find $Input "\n" ] + 1) [ :len $Input ] ];
:set Input [ :pick $Input ($Len + 1) [ :len $Input ] ];
} while=([ :len $Input ] > 0);
:return [];