I have a string template that will be read in from...
# announcements
e
I have a string template that will be read in from a file, so I can’t do regular $-interpolation on it. For example, the template might be “20+%1+5”, and I will want to substitute a value at run-time for “%1". Should I just use
String.replace()
or
String.format()
, or is there a more elegant solution in Kotlin than there would be in Java?
p
I'm not aware of a kotlin specific solution
🙏 1
1
e
@pniederw Thanks! That’s a lot better than not getting an answer.
t
Do the simplest thing that can work until you need something more complex
☝️ 1