Strings In Depth15 / 19
Up next

format

# format (sprintf) fills a template
puts format("%-6s|%5.2f", "pi", 3.14159)
# % is the shorthand operator
puts "%05d" % 42
What you're solving

width, padding, precision