format

JVM
1.0
fun String.format(vararg args: Any?): String

Uses this string as a format string and returns a string obtained by substituting the specified arguments, using the default locale.

JVM
1.0
fun String.Companion.format(
    format: String,
    vararg args: Any?
): String

Uses the provided format as a format string and returns a string obtained by substituting the specified arguments, using the default locale.

JVM
1.0
fun String.format(locale: Locale, vararg args: Any?): String

Uses this string as a format string and returns a string obtained by substituting the specified arguments, using the specified locale.

JVM
1.0
fun String.Companion.format(
    locale: Locale,
    format: String,
    vararg args: Any?
): String

Uses the provided format as a format string and returns a string obtained by substituting the specified arguments, using the specified locale.