Adds padding characters to the end of a string.
Returns a newly-allocated, mutable string which contains at least len
characters.
If st
is shorter than len
, any missing characters are filled in with ch
.
(ensure (eq? (pad "hello" 4) "hello"))
(ensure (eq? (pad "hello" 8) "hello "))
(ensure (eq? (pad "hello" 8 \o) "helloooo"))