in reply to Re^2: truncate string to byte count
in thread truncate string to byte count
Tests 1 to 11 are incorrect because they don't provide UTF-8. Replace
withis truncate_utf8($in, ...), "...";
is truncate_utf8(encode_utf8($in), ...), encode_utf8("...");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: truncate string to byte count
by haukex (Archbishop) on Feb 28, 2019 at 21:17 UTC | |
by ikegami (Patriarch) on Feb 28, 2019 at 21:19 UTC | |
by ikegami (Patriarch) on Feb 28, 2019 at 21:25 UTC |
In Section
Seekers of Perl Wisdom