|< 1 2 >| | 14 Einträge, 2 Seiten |
$mail_fieldvalue =~ s/\n/<br>/g;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
sub wrap {
# FUNKTIONSPARAMETER
##
## Text zum Wrappen
my $txt = $_[0];
# WRAPPING
##
my @w_lines = ();
if(length($txt) > $wrap_at) {
for($i = 0; $i < length($txt); $i += $wrap_at) {
push @w_lines, substr($txt, $i, $wrap_at);
}
}
$txt = "";
$txt = join "\n", @w_lines;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
sub wrap {
my $txt = $_[0];
my $wrap_at = 60;
my @w_lines = ();
my $l_wrapat;
if(length($txt) > $wrap_at) {
for(my $i = 0; $i < length($txt);$i+=$l_wrapat) {
$l_wrapat = $wrap_at;
if (substr($txt, $i, $l_wrapat) =~ /\s/) {
while ($i+$l_wrapat < length($txt) and substr($txt, $i+$l_wrapat, 1) !~ /\s/) { $l_wrapat-- }
}
my $nline = substr($txt, $i, $l_wrapat);
$nline =~ s/^\s*//g;
push(@w_lines, $nline);
}
}
$txt = join("\n", @w_lines);
}
my $pos_leerzeichen = rindex($string," ",60);
|< 1 2 >| | 14 Einträge, 2 Seiten |