lib/Spreadsheet/Engine/Function/REPLACE.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 13 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 2 | 2 | 100.0 |
total | 20 | 20 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Spreadsheet::Engine::Function::REPLACE; | ||||||
2 | |||||||
3 | 28 | 28 | 145 | use strict; | |||
28 | 57 | ||||||
28 | 888 | ||||||
4 | 28 | 28 | 143 | use warnings; | |||
28 | 59 | ||||||
28 | 714 | ||||||
5 | |||||||
6 | 28 | 28 | 142 | use base 'Spreadsheet::Engine::Fn::text'; | |||
28 | 57 | ||||||
28 | 5436 | ||||||
7 | |||||||
8 | 106 | 106 | 1 | 712 | sub signature { 't', '>=1', '>=0', 't' } | ||
9 | |||||||
10 | sub calculate { | ||||||
11 | 53 | 53 | 1 | 2780 | my ($self, $string, $start, $len, $new) = @_; | ||
12 | 53 | 272 | substr $string, $start - 1, $len, $new; | ||||
13 | 53 | 259 | return $string; | ||||
14 | } | ||||||
15 | |||||||
16 | 1; | ||||||
17 | |||||||
18 | __END__ |