Skip to main content

pad

Function pad 

Source
pub fn pad(text: &str, length: usize, fill_char: char) -> String
Expand description

填充文本到指定长度

§Arguments

  • text - 要填充的文本
  • length - 目标长度
  • fill_char - 填充字符

§Returns

填充后的文本