Ok, a little stuck on this one, besides just inventing a bangbang replacement scheme like the old days.
Since String.format() is only available on the Kotlin/jvm, and I can't use a string template unless i construct the string in context.
How are you folks handling situation where you have strings with arguments you need to apply later?
For example: "hello %1$s" or even a template "hello $value"
Yeah, its the same here, I am trying not to use it.
I'm building a date format library and trying to keep all the extra dependencies out of it. including coroutines and compose.
i
ian.shaun.thomas
02/21/2025, 5:42 PM
Is the new date tooling not sufficient to plug in whatever additional formatters you need?
b
Brill
02/21/2025, 5:45 PM
No, its too simple.
I am looking for something like ios and android have where you can specify the short/medium/long and it does it relative to the locale. Also maybe something like DateUtil where it give you more descriptive formatting relative to locale.
I plane to release it in case anyone else can use it.
Brill
02/21/2025, 5:46 PM
but to do that, i need to not use the resource system in kmp, since it relies on coroutines and loading resources from the fs
👍 1
Brill
02/21/2025, 5:47 PM
of course, the easiest thing to do is just delegate down to the platform, but I think it would be helpful to have a kotlin only solution.