#permutation #generate #chars #u8 #set #proc-macro #unic

permut_lib

Simple function to generate permutations on a dictionry of a u8 chars set. I used it for generate unic Items into my proc macros.

3 releases

0.1.2 Jun 4, 2020
0.1.1 Jun 3, 2020
0.1.0 Jun 3, 2020

#2238 in Algorithms

34 downloads per month

BSD-3-Clause-Clear

5KB
89 lines

permut_lib

This crate provide simple function to generate permutations on a dictionry of a u8 chars set. I used it for generate unic Items into my proc macros

Functions

pub fn create_permut(chars: &[u8], count: usize) -> Vec<Vec<u8>>

Universal function for generate unic sequences of u8 chars, like "A", "B", "C", ... , "AA", "AB", ..., "AAAAAB",...

Examples

use permut_lib::permut::*;
create_permut(CHARS_CAPS_LATIN, 195); // result: "A", "B", "C", ... , "AA", "AB" ...  

lib.rs:

This crate provide simple function to generate permutations on a dictionry of a u8 chars set, I used it for generate unic Items into my proc macros

No runtime deps