No commit activity in last 3 years
No release in over 3 years
find the permutations of a string k characters at a time
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

String Permutation

Synopsis

This gem calculates the permutation of a string, k at a times. Example:

Permutation of "code", 2 at a times will be: "co", "oc", "cd", "dc", "ce", "ec", "od", "do", "oe", "eo", "de", "ed"

Usage

gem install 'string_permutations'

In your class:

include StringPermutations

The following will return an array of string with all the possible permutations:

StringPermutations.permutate(string, times)