format

inline fun String.format(vararg args: Any?): String(source)

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

Since Kotlin

1.0

inline fun String.Companion.format(format: String, vararg args: Any?): String(source)

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

Since Kotlin

1.0

@JvmName(name = "formatNullable")
inline fun String.format(locale: Locale?, vararg args: Any?): String(source)

Uses this string as a format string and returns a string obtained by substituting the specified arguments, using the specified locale. If locale is null then no localization is applied.

Since Kotlin

1.4

@JvmName(name = "formatNullable")
inline fun String.Companion.format(locale: Locale?, format: String, vararg args: Any?): String(source)

Uses the provided format as a format string and returns a string obtained by substituting the specified arguments, using the specified locale. If locale is null then no localization is applied.

Since Kotlin

1.4

inline fun String.format(locale: Locale, vararg args: Any?): String(source)

Deprecated

Hidden since 1.4

Use Kotlin compiler 1.4 to avoid deprecation warning.

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

Since Kotlin

1.0

inline fun String.Companion.format(locale: Locale, format: String, vararg args: Any?): String(source)

Deprecated

Hidden since 1.4

Use Kotlin compiler 1.4 to avoid deprecation warning.

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

Since Kotlin

1.0