1. Introduction
  2. Usage
  3. 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<>?
  4. Examples
  5. Notes
  6. Bugs and Limitations
  7. Author
  8. License
  9. Requirements
  10. 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