format

expect fun String.format(locale: Locale, arg: Any, vararg otherArgs: Any): String(source)

Formats this String based on the given locale and using the given arg and otherArgs for replacements.


expect fun String.format(arg: Any, vararg otherArgs: Any): String(source)

Formats this String using the given arg and otherArgs for replacements where a predefined Locale is used.

The predefined Locale might correspond to getDefaultLocale but can also vary (e.g. on JVM platform the default local for formatting is used which corresponds to getDefaultLocale if nothing special is defined).

actual fun String.format(locale: Locale, arg: Any, vararg otherArgs: Any): String(source)

Replaces the first %s inside this String with arg and all subsequent with otherArgs.

This implementation neglects the given locale for now.


actual fun String.format(arg: Any, vararg otherArgs: Any): String(source)

Replaces the first %s inside this String with arg and all subsequent with otherArgs.

This implementation does not take a default Locale into account.

actual fun String.format(locale: Locale, arg: Any, vararg otherArgs: Any): String(source)
actual fun String.format(arg: Any, vararg otherArgs: Any): String(source)