Name : perl-Unicode-Truncate
| |
Version : 0.303
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 16:14:10
|
Group : Development/Libraries/Perl
| Source RPM : perl-Unicode-Truncate-0.303-lp155.1.1.src.rpm
|
Size : 0.05 MB
| |
Packager : https://www_suse_com/
| |
Summary : Unicode-aware efficient string truncation
|
Description :
This module is for truncating UTF-8 encoded Unicode text to particular *byte* lengths while inflicting the least amount of data corruption possible. The resulting truncated string will be no longer than your specified number of bytes (after UTF-8 encoding).
All truncated strings will continue to be valid UTF-8: it won\'t cut in the middle of a UTF-8 encoded code-point. Furthermore, if your text contains combining diacritical marks, this module will not cut in between a diacritical mark and the base character. It will in general try to preserve what users perceive as whole characters, with as little as possible mutilation at the truncation site.
The \'truncate_egc\' function truncates only between at https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Characters _grapheme_clusters_and_glyphs (as defined by at http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries version 7.0.0).
The \'truncate_egc_inplace\' function is identical to \'truncate_egc\' except that the input string will be modified so that no copying occurs. If you pass in a read-only value it will throw an exception.
Eventually I\'d like to support other boundaries such as words and sentences. Those functions will be named \'truncate_word\' and so on.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-U/15.5/x86_64 |