output_as_block

Function output_as_block 

Source
pub fn output_as_block(input: &str) -> String
Expand description

Formats a string into blocks of 5 characters separated by spaces.

This function takes a string slice and returns a new String where a space is inserted every 5 characters.

§Arguments

  • input - A string slice to be formatted

§Returns

A new String with spaces inserted every 5 characters.