mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Fix format method on JVM and JS
This commit is contained in:
@@ -19,6 +19,14 @@
|
|||||||
|
|
||||||
package org.isoron.platform.io
|
package org.isoron.platform.io
|
||||||
|
|
||||||
actual fun sprintf(format: String, vararg args: Any?): String {
|
actual fun format(format: String, arg: String): String {
|
||||||
return js("vsprintf")(format, args)
|
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
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,11 @@
|
|||||||
|
|
||||||
package org.isoron.platform.io
|
package org.isoron.platform.io
|
||||||
|
|
||||||
actual fun sprintf(format: String, vararg args: Any?): String {
|
actual fun format(format: String, arg: String): String =
|
||||||
return String.format(format, *args)
|
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)
|
||||||
Reference in New Issue
Block a user