line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::VisualWidth::UTF8;
|
2
|
1
|
|
|
1
|
|
83345
|
use 5.006;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
5
|
1
|
|
|
1
|
|
531
|
use Text::VisualWidth;
|
|
1
|
|
|
|
|
14
|
|
|
1
|
|
|
|
|
125
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub width {
|
8
|
3
|
|
|
3
|
0
|
13
|
my $str = shift;
|
9
|
3
|
|
|
|
|
24
|
return xs_get_visualwidth_utf8($str);
|
10
|
|
|
|
|
|
|
}
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub trim {
|
13
|
3
|
|
|
3
|
0
|
8
|
my ( $str, $length ) = @_;
|
14
|
3
|
50
|
33
|
|
|
20
|
return $str unless ( defined $str and defined $length );
|
15
|
3
|
|
|
|
|
21
|
return xs_trim_visualwidth_utf8($str, $length);
|
16
|
|
|
|
|
|
|
}
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1;
|
19
|
|
|
|
|
|
|
__END__
|