line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Orientation::StringOperation; |
2
|
1
|
|
|
1
|
|
10
|
use String::Multibyte; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
219
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
sub new{ |
5
|
14
|
50
|
|
14
|
0
|
74
|
return bless { MB => String::Multibyte->new($_[1]) }, $_[0] if $_[1]; |
6
|
0
|
|
|
|
|
0
|
bless {},$_[0]; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
85
|
50
|
|
85
|
0
|
1710
|
sub length { $_[0]->{MB} ? $_[0]->{MB}->length($_[1]) : length $_[1] } |
10
|
8
|
50
|
|
8
|
0
|
121
|
sub reverse { $_[0]->{MB} ? $_[0]->{MB}->strrev($_[1]) : reverse $_[1] } |
11
|
|
|
|
|
|
|
sub substr { |
12
|
80
|
|
|
80
|
0
|
108
|
my $pkg = shift; |
13
|
80
|
50
|
|
|
|
398
|
$pkg->{MB} ? $pkg->{MB}->substr(@_) : |
14
|
|
|
|
|
|
|
substr(shift, shift, shift); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |