Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d0810c42

Von Sven Schöling vor etwa 18 Jahren hinzugefügt

  • ID d0810c4289d895acfb8cf477125c6796c51945e3
  • Vorgänger 06bbc8e7
  • Nachfolger 50305a6d

kleine codeverbesserungen

Unterschiede anzeigen:

bin/mozilla/menu.pl
# than 20 chars and store it in an array.
# use this array later instead of the  -ed label
@chunks = ();
my ($i,$l) =(-1, 20);
my ($i,$l) = (-1, 20);
map {
$l += length $_;
if ($l < 20) { $chunks[$i] .= " $_";
} else { $l =length $_; $chunks[++$i] = $_; }
if (($l += length $_) < 20) {
$chunks[$i] .= " $_";
} else {
$l = length $_;
$chunks[++$i] = $_;
}
} split / /, $label;
map { $chunks[$_] =~ s/ /&nbsp;/ } 0..$#chunks;
map { s/ /&nbsp;/ } @chunks;
# end multi line
$label =~ s/ /&nbsp;/g;

Auch abrufbar als: Unified diff