Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Kernel#format
(::String format, *untyped args) -> ::String
format(*args)
object.c
View on GitHub ↗
static VALUE
f_sprintf(int c, const VALUE *v, VALUE _)
{
return rb_f_sprintf(c, v);
}
Alias of #sprintf
Returns the string resulting from formatting objects into format_string.
For details on format_string, see Format Specifications.