Add length function for strings
This commit is contained in:
parent
f8d6ab4f8c
commit
a9b9d5efa1
1 changed files with 6 additions and 0 deletions
|
@ -166,6 +166,12 @@ my %stdctx = (
|
||||||
'string-not-greaterp' => sub { my ($a, $b) = @_; return !(lc($a) gt lc($b)); },
|
'string-not-greaterp' => sub { my ($a, $b) = @_; return !(lc($a) gt lc($b)); },
|
||||||
'string-not-lessp' => sub { my ($a, $b) = @_; return !(lc($a) lt lc($b)); },
|
'string-not-lessp' => sub { my ($a, $b) = @_; return !(lc($a) lt lc($b)); },
|
||||||
|
|
||||||
|
# string length
|
||||||
|
'length' => sub {
|
||||||
|
my ($a) = @_;
|
||||||
|
return length($a);
|
||||||
|
},
|
||||||
|
|
||||||
# Bitwise operations
|
# Bitwise operations
|
||||||
'logand' => sub {
|
'logand' => sub {
|
||||||
my $v = -1;
|
my $v = -1;
|
||||||
|
|
Loading…
Reference in a new issue