Outdated egg!

This is an egg for CHICKEN 3, the unsupported old release. You're almost certainly looking for the CHICKEN 4 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

  1. Outdated egg!
  2. Introduction
  3. Usage
  4. Documentation
    1. Procedures
      1. string-natural-compare
      2. string-natural-compare-ci
    2. Macros
      1. Case Sensitive
        1. string-natural=?
        2. string-natural<?
        3. string-natural>?
        4. string-natural<=?
        5. string-natural>=?
        6. string-natural<>?
      2. Case Insensitive
        1. string-natural-ci=?
        2. string-natural-ci<?
        3. string-natural-ci>?
        4. string-natural-ci<=?
        5. string-natural-ci>=?
        6. string-natural-ci<>?
  5. Examples
  6. Notes
  7. Bugs and Limitations
  8. Author
  9. License
  10. Requirements
  11. Version History

Introduction

A Chicken Scheme implementation of Natural Order Sorting.

Usage

<pre> (require-extension string-natural-compare) </pre>

Documentation

Procedures

string-natural-compare

<procedure>(string-natural-compare STRING-A STRING-B)</procedure>

Returns:

negative fixnum
STRING-A < STRING-B
zero fixnum
STRING-A = STRING-B
positive fixnum
STRING-A < STRING-B

string-natural-compare-ci

<procedure>(string-natural-compare-ci STRING-A STRING-B)</procedure>

Case Insensitive.

Returns:

negative fixnum
STRING-A < STRING-B
zero fixnum
STRING-A = STRING-B
positive fixnum
STRING-A < STRING-B

Macros

Case Sensitive

string-natural=?
<macro>(string-natural=? STRING-A STRING-B)</macro>
string-natural<?
<macro>(string-natural<? STRING-A STRING-B)</macro>
string-natural>?
<macro>(string-natural>? STRING-A STRING-B)</macro>
string-natural<=?
<macro>(string-natural<=? STRING-A STRING-B)</macro>
string-natural>=?
<macro>(string-natural>=? STRING-A STRING-B)</macro>
string-natural<>?
<macro>(string-natural<>? STRING-A STRING-B)</macro>

Case Insensitive

string-natural-ci=?
<macro>(string-natural-ci=? STRING-A STRING-B)</macro>
string-natural-ci<?
<macro>(string-natural-ci<? STRING-A STRING-B)</macro>
string-natural-ci>?
<macro>(string-natural-ci>? STRING-A STRING-B)</macro>
string-natural-ci<=?
<macro>(string-natural-ci<=? STRING-A STRING-B)</macro>
string-natural-ci>=?
<macro>(string-natural-ci>=? STRING-A STRING-B)</macro>
string-natural-ci<>?
<macro>(string-natural-ci<>? STRING-A STRING-B)</macro>

Examples

Notes

Bugs and Limitations

Author

Kon Lovett

License

Original by Manuel Serrano

Copyright (c) 2008 Kon Lovett. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Requirements

Version History

1.0
Initial release