Skip to content

Commit

Permalink
First pass at [string length]
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Dec 17, 2009
1 parent c60d4cf commit 598e336
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Partcl/commands/string.pm
Expand Up @@ -80,7 +80,11 @@ our sub string(*@args) {
}
return($test_pos);
} elsif $cmd eq 'length' {
return '';
if +@args != 1 {
error('wrong # args: should be "string length string"');
}

return pir::bytelength__is(~@args[0]);
} elsif $cmd eq 'map' {
return '';
} elsif $cmd eq 'match' {
Expand Down

0 comments on commit 598e336

Please sign in to comment.