Thread String manipulation
(30 answers)
Opened by Haselnuss992 at 2018-10-15 15:39
Na so schlimm ist es wieder auch nicht.
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 my $string = 'abcijuwegwegwglwjgwgwhgwkgjnwgkjwngwnmgioghwoöighwghwgökwnglkwhgwohgwelökgnwgklweghgweghwelg,wngwehgwhgweoöhgwegnjwegnwegmwgega'; sub MAXSIZE { 13 }; my @parts = (); my $cur = 0; while ($cur < length($string)) { push @parts, substr($string, $cur, MAXSIZE); $cur += MAXSIZE; } say "@parts"; 1 + 1 = 10
|