add full anybase functionality
This commit is contained in:
parent
500888f5e7
commit
8aeac4fb5d
2 changed files with 66 additions and 3 deletions
|
|
@ -65,7 +65,8 @@ pub fn cat_to_num(text: Vec<String>, alphabet: Vec<String>, char_length: u32) ->
|
|||
///
|
||||
/// assert_eq!(vec!["meow meow mrrp".to_string(), "meow mreow mrrp".to_string(), "mreow meow mrrp".to_string()], split_every_x("meow meow mrrp meow mreow mrrp mreow meow mrrp".to_string(), 3));
|
||||
/// ```
|
||||
pub fn split_every_x(text: String, x: usize) -> Vec<String> {
|
||||
pub fn split_every_x(text: String, x: u32) -> Vec<String> {
|
||||
let x = x as usize;
|
||||
let delim = " ";
|
||||
let tmp: Vec<String> = text.split(delim).map(|item| item.to_string()).collect();
|
||||
let mut output: Vec<String> = Vec::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue