String left pad heavily inspired by left-pad.
libraryDependencies ++= List(
"io.github.asakaev" %% "leftpad-core",
"io.github.asakaev" %% "leftpad-refined"
).map(_ % "<version>")
import io.github.asakaev.leftpad.string._
leftPad("foo", 5)
// => " foo"
leftPad("foobar", 6)
// => "foobar"
leftPad("1", 2, '0')
// => "01"
leftPad("17", 5, 0)
// => "00017"
leftpad is licensed under the MIT license.