Packages / openSUSE Leap 15.6 / Source / Development/Libraries/Perl / perl-Sort-Naturally

Source Package: perl-Sort-Naturally (1.03-bp156.3.1)

sort lexically, but sort numeral parts numerically

This module exports two functions, 'nsort' and 'ncmp'; they are used in implementing my idea of a "natural sorting" algorithm. Under natural sorting, numeric substrings are compared numerically, and other word-characters are compared lexically. This is the way I define natural sorting: * * Non-numeric word-character substrings are sorted lexically, case-insensitively: "Foo" comes between "fish" and "fowl". * * Numeric substrings are sorted numerically: "100" comes after "20", not before. * * \W substrings (neither words-characters nor digits) are _ignored_. * * Our use of \w, \d, \D, and \W is locale-sensitive: Sort::Naturally uses a 'use locale' statement. * * When comparing two strings, where a numeric substring in one place is _not_ up against a numeric substring in another, the non-numeric always comes first. This is fudged by reading pretending that the lack of a number substring has the value -1, like so: foo => "foo", -1 foobar => "foo", -1, "bar" foo13 => "foo", 13, foo13xyz => "foo", 13, "xyz" That's so that "foo" will come before "foo13", which will come before "foobar". * * The start of a string is exceptional: leading non-\W (non-word, non-digit) components are are ignored, and numbers come _before_ letters. * * I define "numeric substring" just as sequences matching m/\d+/ -- scientific notation, commas, decimals, etc., are not seen. If your data has thousands separators in numbers ("20,000 Leagues Under The Sea" or "20.000 lieues sous les mers"), consider stripping them before feeding them to 'nsort' or 'ncmp'.

Package information

Homepage
[http://search.cpan.org/dist/Sort-Naturally/]
License
Artistic-1.0 or GPL-1.0+
Mainteneur du paquet aval
Inconnu : non déclaré dans la source indexée

The following binary packages are built from this source package:

Vulnérabilités connues

Aucun avis correspondant dans les sources suivies.

Dernière synchronisation:

[Catalogue CVE]

Sources

  • Authoritative source; repository metadata signature verified

    Preuve de signature

    leap-15-6-oss-multiarch:ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230

    Repository-signature verification record
    Signed-object SHA-256
    ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230
    Signer fingerprint
    AD485664E901B867051AB15F35A2F86E29B700A4
    Keyring revision
    opensuse-project-signing-key.asc
    SHA-256 b5745739ebfb95b25b8e810f9bcb847fe750ccda598bd85f02f0e974599a6d7e
    Tool and policy
    gpgv (GnuPG) 2.4.9
    openfactory-software-catalog-signature-v1
    Verification time
    Sep 1, 2026
    Repository metadata hash linkage
    Result
    Recorded as verified; digest details unavailable