mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
e15738ea74
- %: string formatting operator that uses the string as a format specification
and applies it to the given argument(s), supports both single arguments and
arrays for multiple substitutions, delegates to sprintf for actual formatting
The method now has comprehensive call-seq documentation with practical
examples demonstrating various sprintf formatting patterns including:
- Zero-padded integers: "%05d" % 123
- Multiple substitutions with arrays: "%-5s: %016x" % [name, id]
- Hash-based named substitutions: "foo = %{foo}" % { :foo => 'bar' }
- Named format specifiers: "%{foo}f" % { :foo => 1 }
Co-authored-by: Atlassian Rovo Dev