diff --git a/core/src/main/js/org/isoron/platform/io/JsStrings.kt b/core/src/main/js/org/isoron/platform/io/JsStrings.kt index 6abbc4675..2d583967c 100644 --- a/core/src/main/js/org/isoron/platform/io/JsStrings.kt +++ b/core/src/main/js/org/isoron/platform/io/JsStrings.kt @@ -19,6 +19,14 @@ package org.isoron.platform.io -actual fun sprintf(format: String, vararg args: Any?): String { - return js("vsprintf")(format, args) +actual fun format(format: String, arg: String): String { + return js("vsprintf")(format, arg) as String +} + +actual fun format(format: String, arg: Int): String { + return js("vsprintf")(format, arg) as String +} + +actual fun format(format: String, arg: Double): String { + return js("vsprintf")(format, arg) as String } \ No newline at end of file diff --git a/core/src/main/jvm/org/isoron/platform/io/Strings.kt b/core/src/main/jvm/org/isoron/platform/io/Strings.kt index de3b612c7..edb787583 100644 --- a/core/src/main/jvm/org/isoron/platform/io/Strings.kt +++ b/core/src/main/jvm/org/isoron/platform/io/Strings.kt @@ -19,6 +19,11 @@ package org.isoron.platform.io -actual fun sprintf(format: String, vararg args: Any?): String { - return String.format(format, *args) -} \ No newline at end of file +actual fun format(format: String, arg: String): String = + String.format(format, arg) + +actual fun format(format: String, arg: Int): String = + String.format(format, arg) + +actual fun format(format: String, arg: Double): String = + String.format(format, arg) \ No newline at end of file