improve completion generation/binary usage
This commit is contained in:
parent
a4bcaf6103
commit
b440555138
4 changed files with 58 additions and 48 deletions
|
|
@ -70,7 +70,11 @@ pub fn cat_to_num(text: Vec<String>, alphabet: Vec<String>, char_length: u32) ->
|
|||
pub(crate) fn split_every_x(text: impl AsRef<str>, x: u32) -> Vec<String> {
|
||||
let x = x as usize;
|
||||
let delim = " ";
|
||||
let tmp: Vec<String> = text.as_ref().split(delim).map(|item| item.to_string()).collect();
|
||||
let tmp: Vec<String> = text
|
||||
.as_ref()
|
||||
.split(delim)
|
||||
.map(|item| item.to_string())
|
||||
.collect();
|
||||
let mut output: Vec<String> = Vec::new();
|
||||
for i in 0..tmp.len() {
|
||||
if i % x == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue