Documentation

Mathlib.Data.String.Lemmas

Miscellaneous lemmas about strings #

@[simp]
theorem String.length_replicate (n : ) (c : Char) :
@[simp]
theorem String.length_leftpad (n : ) (c : Char) (s : String) :
(leftpad n c s).length = max n s.length

The length of the String returned by String.leftpad n a c is equal to the larger of n and s.length