diff --git a/lib/Minilisp.pm b/lib/Minilisp.pm index 574e246..f776389 100644 --- a/lib/Minilisp.pm +++ b/lib/Minilisp.pm @@ -227,6 +227,14 @@ my %stdctx = ( '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 operations + 'string-upcase' => sub { return uc(shift); }, + 'string-downcase' => sub { return lc(shift); }, + 'string-capitalize' => sub { + my $str = shift; + return $str =~ s/(\S+)/ucfirst($1)/erg; + }, + # Bitwise operations 'logand' => sub { my $v = -1;