Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding catch().err / .value, regexp and regsub #222

Merged
merged 6 commits into from
Sep 13, 2024
Merged

Adding catch().err / .value, regexp and regsub #222

merged 6 commits into from
Sep 13, 2024

Conversation

ldemailly
Copy link
Member

@ldemailly ldemailly commented Sep 12, 2024

regsub has 2 variants, default 2 args is just boolean match, 3rd arg true it returns all the first matches

Fixes #105

it's a tiny bit costly

┌─────────────────────────────────────────────────────────────────────┐
│ Diff between grol_noregexp and grol                                 │
├──────────┬──────────────────────────┬──────────┬──────────┬─────────┤
│ PERCENT  │ NAME                     │ OLD SIZE │ NEW SIZE │ DIFF    │
├──────────┼──────────────────────────┼──────────┼──────────┼─────────┤
│ +100%    │ regexp                   │          │ 131 kB   │ +131 kB │
│ +121.01% │ unicode                  │ 14 kB    │ 30 kB    │ +17 kB  │
...
│ +4.69%   │ grol_noregexp            │ 6.8 MB   │ 7.1 MB   │ +318 kB │

@ldemailly ldemailly changed the title Adding catch().err / .value Adding catch().err / .value, regexp and regsub Sep 12, 2024
@ldemailly ldemailly requested a review from ccoVeille September 12, 2024 23:34
@ldemailly ldemailly merged commit 54644b3 into main Sep 13, 2024
3 checks passed
@ldemailly ldemailly deleted the catch branch September 13, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grol based tests, catch {}, string operations
2 participants