Skip to content

Commit

Permalink
Add func starts_with
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouzierinverse committed Oct 3, 2024
1 parent 8c4f7dd commit fcb4e1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pf/util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ BEGIN {
chown_pf
norm_net_mask
safe_pf_run
starts_with
);
}

Expand Down Expand Up @@ -1976,6 +1977,10 @@ sub norm_net_mask {
return $mask_norm_dotted;
}

sub starts_with {
return rindex($_[0], $_[1], 0) == 0;
}

=back
=head1 AUTHOR
Expand Down

0 comments on commit fcb4e1c

Please sign in to comment.