Code Monkey home page Code Monkey logo

alphanumeric-sort's Introduction

Hi, welcome to my Github pages.

Things Related to My Projects

Rust JavaScript TypeScript Java C PHP Golang Bash

Ubuntu Server Linux Mint Android Windows

Tokio Rocket Axum napi-rs iced Node.js Webpack Express Fastify NestJS + Fastify Bootstrap Vite Vue.js Handlebars Tera Sass Nginx Apache httpd Docker

MySQL SQLite MongoDB Redis

alphanumeric-sort's People

Contributors

cuviper avatar dependabot[bot] avatar magiclen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

alphanumeric-sort's Issues

Unable to sort specific string

alphanumeric-sort = "1.5.0"

fn main() {
    let mut v = ["a0b2", "a0b1"];
    alphanumeric_sort::sort_str_slice(&mut v);
    println!("{:?}", v);
    v.sort();
    println!("{:?}", v);

❯ cargo run
["a0b2", "a0b1"]
["a0b1", "a0b2"]

FR: Support non-ASCII characters

This crate doesn't seem to work with non-ASCII characters. Sorting French or Spanish words, let alone Chinese or Japanese words don't seem to be working correctly.

Suport big integers

Large integers (e.g. outside of f64 precision bits) can compare equal even when they are not.

// fails - should pass
assert_eq!(alphanumeric_sort::compare_str(
    "23478435345672365487236435437465873645736452658734658734653645872542736437465365487326548734658736457265345736458735",
    "23478435345672365487236435437465873645736452658734658734653645872542736437465365487326548734658736457265345736458736"
    ), Ordering::Less);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.