RubyGems Navigation menu

naturalsort 1.1.1

Examples:

['a1', 'a11', 'a12', 'a2', 'a21']       => ['a1', 'a2', 'a11', 'a12','a21']
['a', 'b', 'c', 'A', 'B', 'C']          => ['A', 'a', 'B', 'b', 'C', 'c']
['x__2', 'x_1']                         => ['x_1', 'x__2']
['x2-y08', 'x2-g8', 'x2-y7', 'x8-y8']   => ['x2-g8', 'x2-y7', 'x2-y08', 'x8-y8']
  • ‘x02-y08’, ‘x02-g8’, ‘x2-y7’, ‘x8-y8’

    > [‘x02-g8’, ‘x2-y7’, ‘x02-y08’, ‘x8-y8’]

Features:

  • sort case insensitive

  • sort filename matching pattern “abc1”, “abc12”, “abc2” in the correct order

  • sort filename matching pattern “a1b2”

  • sort underscore insensitive

Install:

  • sudo gem install naturalsort

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 1.2.0 - January 26, 2015 (11.5 KB)
  2. 1.1.1 - July 21, 2010 (8.5 KB)
  3. 1.1.0 - January 07, 2008* (7.5 KB)
  4. 1.0.1 - December 17, 2007* (7.5 KB)
  5. 1.0.0 - December 16, 2007* (7 KB)

Development Dependencies (2):

hoe >= 2.6.0
rubyforge >= 2.0.4

Owners:

Authors:

  • Benjamin Francisoud

SHA 256 checksum:

9417f188fcfb9e666b1f3e29a9f5886e7c5b0c19f5b523f55e6f81e25fe1c522

Total downloads 402,548

For this version 58,166

Licenses:

N/A

Required Ruby Version: None

Links: