fixed a bug in fixed_width

This commit is contained in:
Daniel Knuettel 2024-07-23 14:03:15 +02:00
parent 066a86539e
commit d9c63253aa

View File

@ -14,7 +14,7 @@ fn fixed_width(input: &String, len: usize) -> String
{ {
let cut_to = len - 1_usize; let cut_to = len - 1_usize;
let start_from = clen - cut_to; let start_from = clen - cut_to;
let cutted_result = &input[start_from..]; let cutted_result: String = input.chars().skip(start_from).collect();
let mut result: String = String::from(PLACE_HOLDER); let mut result: String = String::from(PLACE_HOLDER);
result.push_str(&cutted_result); result.push_str(&cutted_result);